Skip to content

Commit 1aff2c7

Browse files
committed
indent cleanup [netlify-build]
1 parent bc8f93e commit 1aff2c7

File tree

1 file changed

+37
-36
lines changed

1 file changed

+37
-36
lines changed

src/unify/data-graph/data-graph.md

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -171,18 +171,18 @@ Example:
171171
```python
172172
data_graph {
173173
#define entities
174-
entity "account-entity" {
175-
name = "account"
176-
table_ref = "PRODUCTION.CUST.ACCOUNT"
177-
primary_key = "id"
178-
enrichment_enabled = true
179-
}
174+
entity "account-entity" {
175+
name = "account"
176+
å table_ref = "PRODUCTION.CUST.ACCOUNT"
177+
primary_key = "id"
178+
enrichment_enabled = true
179+
}
180180

181-
entity "cart-entity" {
182-
name = "cart"
183-
table_ref = "PRODUCTION.CUST.CART"
184-
primary_key = "id"
185-
}
181+
entity "cart-entity" {
182+
name = "cart"
183+
table_ref = "PRODUCTION.CUST.CART"
184+
primary_key = "id"
185+
}
186186

187187
#define profile
188188
profile {
@@ -210,12 +210,12 @@ Example:
210210

211211
data_graph {
212212
#define entities
213-
214-
#define profile
213+
#define profile
214+
215215
profile {
216-
217-
profile_folder = "PRODUCTION.segment"
218-
type = segment:materialized
216+
217+
profile_folder = "PRODUCTION.segment"
218+
type = segment:materialized
219219

220220
#Option 2: relate account to profile with a trait`
221221
relationship: "user-accounts" {
@@ -246,8 +246,7 @@ Example:
246246
data_graph {
247247
#define entities
248248

249-
#define entities
250-
entity "account-entity" {
249+
entity "account-entity" {
251250
name = "account"
252251
table_ref = "PRODUCTION.CUST.ACCOUNT"
253252
primary_key = "id"
@@ -260,7 +259,8 @@ entity "account-entity" {
260259
primary_key = "id"
261260
}
262261

263-
#define profile
262+
#define profile
263+
264264
profile {
265265
profile_folder = "PRODUCTION.segment"
266266
type = segment:materialized
@@ -310,6 +310,7 @@ Example:
310310

311311
data_graph {
312312
#define entities
313+
313314
profile {
314315
#define profile
315316
...
@@ -356,26 +357,26 @@ data_graph {
356357
join_key = "email_id"
357358
}
358359

359-
#relate carts to account
360-
relationship "user-carts" {
361-
name = "Shopping Carts"
362-
related_entity = "cart-entity"
363-
join_on = "ACCOUNT.ID = CART.ACCOUNT_ID"
364-
365-
#relate carts to products with a junction table
366-
relationship "products" {
367-
name = "Purchased Products"
368-
related_entity = "product-entity"
369-
junction_table {
370-
primary_key = "id"
371-
table_ref = "PRODUCTION.CUSTOMER.CART_PRODUCT"
372-
left_join_on = "CART.ID = CART_ID"
373-
#schema.table is implied within the cart_id key
374-
right_join_on = "PRODUCT_ID = PRODUCT.SKU"
375-
}
360+
#relate carts to account
361+
relationship "user-carts" {
362+
name = "Shopping Carts"
363+
related_entity = "cart-entity"
364+
join_on = "ACCOUNT.ID = CART.ACCOUNT_ID"
365+
366+
#relate carts to products with a junction table
367+
relationship "products" {
368+
name = "Purchased Products"
369+
related_entity = "product-entity"
370+
junction_table {
371+
primary_key = "id"
372+
table_ref = "PRODUCTION.CUSTOMER.CART_PRODUCT"
373+
left_join_on = "CART.ID = CART_ID"
374+
#schema.table is implied within the cart_id key
375+
right_join_on = "PRODUCT_ID = PRODUCT.SKU"
376376
}
377377
}
378378
}
379+
}
379380
}
380381

381382
#define account, product, and cart entities

0 commit comments

Comments
 (0)