-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: allow configuring yaml settings inside dbt-osmosis var key
- Loading branch information
Showing
13 changed files
with
161 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,21 @@ | ||
--- | ||
version: 2 | ||
models: | ||
- name: customers | ||
description: This table has basic information about a customer, as well as some derived facts based on a customer's orders | ||
- name : customers | ||
description : This table has basic information about a customer, as well as some derived facts based on a customer's orders | ||
|
||
columns: | ||
- name: customer_id | ||
description: This is a unique identifier for a customer | ||
tests: | ||
columns : | ||
- name : customer_id | ||
description : This is a unique identifier for a customer | ||
tests : | ||
- unique | ||
- not_null | ||
|
||
data_type: INTEGER | ||
- name: first_name | ||
description: Customer's first name. PII. | ||
data_type: VARCHAR | ||
- name: last_name | ||
description: Customer's last name. PII. | ||
data_type: VARCHAR | ||
- name: first_order | ||
description: Date (UTC) of a customer's first order | ||
data_type: DATE | ||
- name: most_recent_order | ||
description: Date (UTC) of a customer's most recent order | ||
data_type: DATE | ||
- name: number_of_orders | ||
description: Count of the number of orders a customer has placed | ||
data_type: BIGINT | ||
- name: customer_lifetime_value | ||
data_type: DOUBLE | ||
- name: customer_average_value | ||
data_type: DECIMAL(18,3) | ||
data_type : INTEGER | ||
- {name : first_name, description : Customer's first name. PII., data_type : VARCHAR} | ||
- {name : last_name, description : Customer's last name. PII., data_type : VARCHAR} | ||
- {name : first_order, description : Date (UTC) of a customer's first order, data_type : DATE} | ||
- {name : most_recent_order, description : Date (UTC) of a customer's most recent order, data_type : DATE} | ||
- {name : number_of_orders, description : Count of the number of orders a customer has placed, data_type : BIGINT} | ||
- {name : customer_lifetime_value, data_type : DOUBLE} | ||
- {name : customer_average_value, data_type : 'DECIMAL(18,3)'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,58 @@ | ||
--- | ||
version: 2 | ||
models: | ||
- name: orders | ||
description: This table has basic information about orders, as well as some derived facts based on payments | ||
- name : orders | ||
description : This table has basic information about orders, as well as some derived facts based on payments | ||
|
||
columns: | ||
- name: order_id | ||
tests: | ||
columns : | ||
- name : order_id | ||
tests : | ||
- unique | ||
- not_null | ||
description: This is a unique identifier for an order | ||
data_type: INTEGER | ||
- name: customer_id | ||
description: Foreign key to the customers table | ||
tests: | ||
description : This is a unique identifier for an order | ||
data_type : INTEGER | ||
- name : customer_id | ||
description : Foreign key to the customers table | ||
tests : | ||
- not_null | ||
- relationships: | ||
to: ref('customers') | ||
field: customer_id | ||
- relationships : | ||
to : ref('customers') | ||
field : customer_id | ||
|
||
data_type: INTEGER | ||
- name: order_date | ||
description: Date (UTC) that the order was placed | ||
data_type: DATE | ||
- name: status | ||
tests: | ||
- accepted_values: | ||
values: ['placed', 'shipped', 'completed', 'return_pending', 'returned'] | ||
data_type : INTEGER | ||
- {name : order_date, description : Date (UTC) that the order was placed, data_type : DATE} | ||
- name : status | ||
tests : | ||
- accepted_values : | ||
values : ['placed', 'shipped', 'completed', 'return_pending', 'returned'] | ||
|
||
description: '{{ doc("orders_status") }}' | ||
data_type: VARCHAR | ||
- name: credit_card_amount | ||
description: Amount of the order (AUD) paid for by credit card | ||
tests: | ||
description : '{{ doc("orders_status") }}' | ||
data_type : VARCHAR | ||
- name : credit_card_amount | ||
description : Amount of the order (AUD) paid for by credit card | ||
tests : | ||
- not_null | ||
|
||
data_type: DOUBLE | ||
- name: coupon_amount | ||
description: Amount of the order (AUD) paid for by coupon | ||
tests: | ||
data_type : DOUBLE | ||
- name : coupon_amount | ||
description : Amount of the order (AUD) paid for by coupon | ||
tests : | ||
- not_null | ||
|
||
data_type: DOUBLE | ||
- name: bank_transfer_amount | ||
description: Amount of the order (AUD) paid for by bank transfer | ||
tests: | ||
data_type : DOUBLE | ||
- name : bank_transfer_amount | ||
description : Amount of the order (AUD) paid for by bank transfer | ||
tests : | ||
- not_null | ||
|
||
data_type: DOUBLE | ||
- name: gift_card_amount | ||
description: Amount of the order (AUD) paid for by gift card | ||
tests: | ||
data_type : DOUBLE | ||
- name : gift_card_amount | ||
description : Amount of the order (AUD) paid for by gift card | ||
tests : | ||
- not_null | ||
data_type: DOUBLE | ||
- name: amount | ||
description: Total amount (AUD) of the order | ||
tests: | ||
data_type : DOUBLE | ||
- name : amount | ||
description : Total amount (AUD) of the order | ||
tests : | ||
- not_null | ||
data_type: DOUBLE | ||
data_type : DOUBLE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,16 @@ | ||
--- | ||
version: 2 | ||
models: | ||
- name: orders_prefix | ||
columns: | ||
- name: o_order_id | ||
data_type: INTEGER | ||
- name: o_customer_id | ||
data_type: INTEGER | ||
- name: o_order_date | ||
data_type: DATE | ||
- name: o_status | ||
description: '{{ doc("orders_status") }}' | ||
data_type: VARCHAR | ||
- name: o_credit_card_amount | ||
data_type: DOUBLE | ||
- name: o_coupon_amount | ||
data_type: DOUBLE | ||
- name: o_bank_transfer_amount | ||
data_type: DOUBLE | ||
- name: o_gift_card_amount | ||
data_type: DOUBLE | ||
- name: o_amount | ||
data_type: DOUBLE | ||
- name : orders_prefix | ||
columns : | ||
- {name : o_order_id, data_type : INTEGER} | ||
- {name : o_customer_id, data_type : INTEGER} | ||
- {name : o_order_date, data_type : DATE} | ||
- name : o_status | ||
description : '{{ doc("orders_status") }}' | ||
data_type : VARCHAR | ||
- {name : o_credit_card_amount, data_type : DOUBLE} | ||
- {name : o_coupon_amount, data_type : DOUBLE} | ||
- {name : o_bank_transfer_amount, data_type : DOUBLE} | ||
- {name : o_gift_card_amount, data_type : DOUBLE} | ||
- {name : o_amount, data_type : DOUBLE} |
17 changes: 8 additions & 9 deletions
17
demo_duckdb/models/staging/jaffle_shop/main/stg_customers.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
--- | ||
version: 2 | ||
models: | ||
- name: stg_customers | ||
columns: | ||
- name: customer_id | ||
tests: | ||
- name : stg_customers | ||
columns : | ||
- name : customer_id | ||
tests : | ||
- unique | ||
- not_null | ||
|
||
data_type: INTEGER | ||
- name: first_name | ||
data_type: VARCHAR | ||
- name: last_name | ||
data_type: VARCHAR | ||
data_type : INTEGER | ||
- {name : first_name, data_type : VARCHAR} | ||
- {name : last_name, data_type : VARCHAR} |
29 changes: 14 additions & 15 deletions
29
demo_duckdb/models/staging/jaffle_shop/main/stg_orders.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
--- | ||
version: 2 | ||
models: | ||
- name: stg_orders | ||
columns: | ||
- name: order_id | ||
tests: | ||
- name : stg_orders | ||
columns : | ||
- name : order_id | ||
tests : | ||
- unique | ||
- not_null | ||
data_type: INTEGER | ||
- name: customer_id | ||
data_type: INTEGER | ||
- name: order_date | ||
data_type: DATE | ||
- name: status | ||
tests: | ||
- accepted_values: | ||
values: ['placed', 'shipped', 'completed', 'return_pending', 'returned'] | ||
data_type : INTEGER | ||
- {name : customer_id, data_type : INTEGER} | ||
- {name : order_date, data_type : DATE} | ||
- name : status | ||
tests : | ||
- accepted_values : | ||
values : ['placed', 'shipped', 'completed', 'return_pending', 'returned'] | ||
|
||
data_type: VARCHAR | ||
description: '{{ doc("orders_status") }}' | ||
data_type : VARCHAR | ||
description : '{{ doc("orders_status") }}' |
27 changes: 13 additions & 14 deletions
27
demo_duckdb/models/staging/jaffle_shop/main/stg_payments.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
--- | ||
version: 2 | ||
models: | ||
- name: stg_payments | ||
columns: | ||
- name: payment_id | ||
tests: | ||
- name : stg_payments | ||
columns : | ||
- name : payment_id | ||
tests : | ||
- unique | ||
- not_null | ||
data_type: integer | ||
- name: order_id | ||
data_type: integer | ||
- name: payment_method | ||
tests: | ||
- accepted_values: | ||
values: ["credit_card", "coupon", "bank_transfer", "gift_card"] | ||
data_type: varchar | ||
- name: amount | ||
data_type: double | ||
data_type : integer | ||
- {name : order_id, data_type : integer} | ||
- name : payment_method | ||
tests : | ||
- accepted_values : | ||
values : ["credit_card", "coupon", "bank_transfer", "gift_card"] | ||
data_type : varchar | ||
- {name : amount, data_type : double} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
--- | ||
version: 2 | ||
seeds: | ||
- name: raw_customers | ||
meta: | ||
foo: bar | ||
columns: | ||
- name: id | ||
data_type: INTEGER | ||
- name: first_name | ||
data_type: VARCHAR | ||
- name: last_name | ||
data_type: VARCHAR | ||
- name : raw_customers | ||
meta : | ||
foo : bar | ||
columns : | ||
- {name : id, data_type : INTEGER} | ||
- {name : first_name, data_type : VARCHAR} | ||
- {name : last_name, data_type : VARCHAR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
--- | ||
version: 2 | ||
seeds: | ||
- name: raw_orders | ||
columns: | ||
- name: id | ||
data_type: INTEGER | ||
- name: user_id | ||
data_type: INTEGER | ||
- name: order_date | ||
data_type: DATE | ||
- name: status | ||
description: '{{ doc("orders_status") }}' | ||
data_type: VARCHAR | ||
- name : raw_orders | ||
columns : | ||
- {name : id, data_type : INTEGER} | ||
- {name : user_id, data_type : INTEGER} | ||
- {name : order_date, data_type : DATE} | ||
- name : status | ||
description : '{{ doc("orders_status") }}' | ||
data_type : VARCHAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
--- | ||
version: 2 | ||
seeds: | ||
- name: raw_payments | ||
columns: | ||
- name: id | ||
data_type: INTEGER | ||
- name: order_id | ||
data_type: INTEGER | ||
- name: payment_method | ||
data_type: VARCHAR | ||
- name: amount | ||
data_type: INTEGER | ||
- name : raw_payments | ||
columns : | ||
- {name : id, data_type : INTEGER} | ||
- {name : order_id, data_type : INTEGER} | ||
- {name : payment_method, data_type : VARCHAR} | ||
- {name : amount, data_type : INTEGER} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.