You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/nested_CTES.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,9 +85,9 @@ SELECT * FROM goku_outer
85
85
IMHO, this is excessive and it makes query injection via templating needlessly difficult, especially given that both nested subqueries and sequentially nested CTEs are already supported.
86
86
87
87
88
-
# Reasons (ordered by ease of explanation)
88
+
##Reasons (ordered by ease of explanation)
89
89
90
-
## 1. Everyone else does it
90
+
###1. Everyone else does it
91
91
92
92
The open-source data engineering ecosystem is growing at a breakneck speed -- especially tools that work with cloud data warehouses (e.g. [Airflow](https://airflow.apache.org/), [dbt](https://www.getdbt.com/), [SQLFluff](https://www.sqlfluff.com/), and [Great Expectations](https://greatexpectations.io/))
93
93
@@ -111,7 +111,7 @@ The below table shows which databases support this convention.
111
111
112
112
113
113
114
-
### Low-hanging, Syntactic Fruit
114
+
### 2. Low-hanging, Syntactic Fruit
115
115
116
116
Both nested subqueries and sequentially nested CTEs are already supported, so IMO, it isn't a large amount of effor to support this.
117
117
@@ -125,7 +125,7 @@ WITH goku_outer AS (
125
125
SELECT*FROM goku_outer
126
126
```
127
127
128
-
### more flexibility with SQL templating engines
128
+
### 3. more flexibility with SQL templating engines
129
129
130
130
Quote from Jacob Matson ([@matsonj](https://github.com/matsonj)):
131
131
@@ -170,4 +170,4 @@ In fact, the magic of dbt is just Jinja templating. dbt goes one step further an
170
170
171
171
If TSQL could allow wrapping arbitrary SELECT queries within a CTE, it would have the following effects on dbt custom adapter maintenance:
172
172
- 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
173
-
- dbt-msft users can take advantage of community-supported adapters with more confidence (many package maintainers make heavy use of CTE-query-wrapping)
173
+
- 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