Skip to content

Commit b755ec2

Browse files
authored
Merge pull request #10 from dbt-msft/nested_CTEs
Added some minor tweaks, spelling, and formatting
2 parents 6fd775e + 2abf182 commit b755ec2

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Contributing to dbt-msft-docs
3-
sidebar_position: 6
3+
sidebar_position: 7
44
---
55

66
# Contributing to dbt-msft-docs

docs/nested_CTES.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Nested CTES in TSQL, a treatise
3+
sidebar_position: 6
4+
---
5+
16
# Nested CTES in TSQL, a treatise
27

38
## Ask
@@ -152,12 +157,13 @@ Below is a trivial example of generating an HTML list with a Python list variabl
152157
Templating is increasingly popular in data warehouse development. Some great use cases:
153158
- parameterizing database names for deploying to multiple environments
154159
- making repetitive, boilerplate SQL into something more observable
155-
- abstract logic into
156-
- injecting SQL
160+
- model abstraction logic
161+
- injecting dynamic SQL
162+
- functional code chaining concepts
157163

158-
In fact, the magic of dbt is just Jinja templating. dbt goes one step further and templatizing your DDL statements like `CREATE TABLE AS` and `CREATE VIEW AS` allowing users to just focus on SELET queries. ([to read more about the power of dbt](https://docs.getdbt.com/docs/introduction#what-makes-dbt-so-powerful)
164+
In fact, the magic of dbt is just Jinja templating. dbt goes one step further and templatizing your DDL statements like `CREATE TABLE AS` and `CREATE VIEW AS` allowing users to just focus on SELECT queries. ([to read more about the power of dbt](https://docs.getdbt.com/docs/introduction#what-makes-dbt-so-powerful))
159165

160166

161167
If TSQL could allow wrapping arbitrary SELECT queries within a CTE, it would have the following effects on dbt custom adapter maintenance:
162-
- dbt-sqlserver and dbt-synapse get `ephemeral` materializations and dbt tests without extra work
163-
- dbt-msft users can take adavantage of community-supported adapters with more confidence (many package maintainers make heavy use of CTE-query-wrapping)
168+
- dbt-sqlserver and dbt-synapse get the benefits of [ephemeral](https://docs.getdbt.com/docs/building-a-dbt-project/building-models/materializations#ephemeral) materializations and dbt tests without extra work
169+
- dbt-msft users can take advantage of community-supported adapters with more confidence (many package maintainers make heavy use of CTE-query-wrapping)

0 commit comments

Comments
 (0)