Skip to content

Commit 3368ba4

Browse files
committed
docs: Prefer literal over folded strings in YAML
1 parent 36cda9d commit 3368ba4

35 files changed

+142
-105
lines changed

docs/pages/product/apis-integrations/recipes/cast-numerics.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ numeric measure:
1616
```yaml
1717
cubes:
1818
- name: cube_with_big_numbers
19-
sql: >
19+
sql: |
2020
SELECT 123::BIGINT AS number UNION ALL
2121
SELECT 9007199254740991::BIGINT AS number UNION ALL
2222
SELECT 9999999999999999::BIGINT AS number

docs/pages/product/apis-integrations/recipes/sorting.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Consider the following data model:
2929
```yaml
3030
cubes:
3131
- name: sort_nulls
32-
sql: >
32+
sql: |
3333
SELECT 1234 AS value UNION ALL
3434
SELECT 5678 AS value UNION ALL
3535
SELECT NULL AS value

docs/pages/product/caching/recipes/incrementally-building-pre-aggregations-for-a-date-range.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Let's use an example of a cube with a nested SQL query:
2121
```yaml
2222
cubes:
2323
- name: users_with_organizations
24-
sql: >
24+
sql: |
2525
WITH users AS (
2626
SELECT
2727
md5(company) AS organization_id,
@@ -168,7 +168,7 @@ properties][ref-schema-ref-preagg-buildrange]:
168168
```yaml
169169
cubes:
170170
- name: users_with_organizations
171-
sql: >
171+
sql: |
172172
WITH users AS (
173173
SELECT
174174
md5(company) AS organization_id,

docs/pages/product/caching/recipes/refreshing-select-partitions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ cubes:
125125
granularity: day
126126
partition_granularity: month # this is where we specify the partition
127127
refreshKey:
128-
sql: >
128+
sql: |
129129
SELECT max(updated_at) FROM public.orders WHERE
130130
{FILTER_PARAMS.orders.created_at.filter('created_at')}
131131
```

docs/pages/product/configuration/recipes/custom-data-model-per-tenant.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ This is the `products` cube for the `avocado` tenant:
394394
```yaml
395395
cubes:
396396
- name: products
397-
sql: >
397+
sql: |
398398
SELECT * FROM public.Products WHERE MOD (id, 2) = 1
399399
```
400400
@@ -417,7 +417,7 @@ This is the `products` cube for the `mango` tenant:
417417
```yaml
418418
cubes:
419419
- name: products
420-
sql: >
420+
sql: |
421421
SELECT * FROM public.Products WHERE MOD (id, 2) = 0
422422
```
423423

docs/pages/product/configuration/reference/config.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,7 @@ You can use the custom value from extend context in your data model like this:
10891089

10901090
cubes:
10911091
- name: users
1092-
sql: >
1092+
sql: |
10931093
SELECT *
10941094
FROM users
10951095
WHERE organization_id={{ securityContext['active_organization'] }}

docs/pages/product/data-modeling/concepts.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ cube(`orders`, {
8585
```yaml
8686
cubes:
8787
- name: orders
88-
sql: >
88+
sql: |
8989
SELECT *
9090
FROM orders, line_items
9191
WHERE orders.id = line_items.order_id
@@ -564,7 +564,7 @@ Consider the following cube:
564564
```yaml
565565
cubes:
566566
- name: employees
567-
sql: >
567+
sql: |
568568
SELECT 1 AS id, 'Ali' AS first_name, 20 AS age, 'Los Gatos' AS city UNION ALL
569569
SELECT 2 AS id, 'Bob' AS first_name, 30 AS age, 'San Diego' AS city UNION ALL
570570
SELECT 3 AS id, 'Eve' AS first_name, 40 AS age, 'San Diego' AS city

docs/pages/product/data-modeling/concepts/calculated-members.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ integer value.
2727
```yaml
2828
cubes:
2929
- name: orders
30-
sql: >
30+
sql: |
3131
SELECT 1 AS id, 'processing' AS status UNION ALL
3232
SELECT 2 AS id, 'completed' AS status UNION ALL
3333
SELECT 3 AS id, 'completed' AS status
@@ -177,7 +177,7 @@ between `orders` and `users`:
177177
```yaml
178178
cubes:
179179
- name: orders
180-
sql: >
180+
sql: |
181181
SELECT 1 AS id, 1 AS user_id UNION ALL
182182
SELECT 2 AS id, 1 AS user_id UNION ALL
183183
SELECT 3 AS id, 2 AS user_id
@@ -202,7 +202,7 @@ cubes:
202202
relationship: one_to_many
203203

204204
- name: users
205-
sql: >
205+
sql: |
206206
SELECT 1 AS id, 'Alice' AS name UNION ALL
207207
SELECT 2 AS id, 'Bob' AS name
208208
@@ -308,7 +308,7 @@ granularity. It can be one of the [default granularities][ref-default-granularit
308308
```yaml
309309
cubes:
310310
- name: users
311-
sql: >
311+
sql: |
312312
SELECT '2025-01-01T00:00:00Z' AS created_at UNION ALL
313313
SELECT '2025-02-01T00:00:00Z' AS created_at UNION ALL
314314
SELECT '2025-03-01T00:00:00Z' AS created_at
@@ -416,7 +416,7 @@ relationship between `orders` and `users`:
416416
```yaml
417417
cubes:
418418
- name: orders
419-
sql: >
419+
sql: |
420420
SELECT 1 AS id, 1 AS user_id UNION ALL
421421
SELECT 2 AS id, 1 AS user_id UNION ALL
422422
SELECT 3 AS id, 2 AS user_id
@@ -437,7 +437,7 @@ cubes:
437437
relationship: one_to_many
438438

439439
- name: users
440-
sql: >
440+
sql: |
441441
SELECT 1 AS id, 'Alice' AS name UNION ALL
442442
SELECT 2 AS id, 'Bob' AS name
443443

docs/pages/product/data-modeling/concepts/code-reusability-extending-cubes.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ First, the `sql` parameter can be overridden in each child cube:
141141
```yaml
142142
cubes:
143143
- name: product_purchases
144-
sql: >
144+
sql: |
145145
SELECT *
146146
FROM events
147147
WHERE {FILTER_PARAMS.product_purchases.timestamp.filter('time')}
@@ -172,7 +172,7 @@ in the SQL query:
172172
```yaml
173173
cubes:
174174
- name: base_events
175-
sql: >
175+
sql: |
176176
SELECT *
177177
FROM events
178178
WHERE

docs/pages/product/data-modeling/concepts/data-blending.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ cube(`all_sales`, {
191191
```yaml
192192
cubes:
193193
- name: all_sales
194-
sql: >
194+
sql: |
195195
SELECT
196196
amount,
197197
user_id AS customer_id,
@@ -228,7 +228,7 @@ cubes:
228228
- sql: "{CUBE}.row_type = 'retail'"
229229

230230
- name: online_revenue_percentage
231-
sql: >
231+
sql: |
232232
{online_revenue} /
233233
NULLIF({online_revenue} + {offline_revenue}, 0)
234234
type: number

0 commit comments

Comments
 (0)