-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow sourcing most options from config and dbt project yml
- Loading branch information
Showing
14 changed files
with
373 additions
and
153 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
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,3 +1,5 @@ | ||
{{ config(dbt_osmosis_output_to_lower = true) }} | ||
|
||
with source as ( | ||
|
||
{#- | ||
|
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,6 +1,8 @@ | ||
version: 2 | ||
seeds: | ||
- name: raw_customers | ||
meta: | ||
foo: bar | ||
columns: | ||
- name: id | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ seeds: | |
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,54 +1,58 @@ | ||
version: 2 | ||
models: | ||
- name: orders | ||
description: This table has basic information about orders, as well as some derived | ||
facts based on payments | ||
|
||
columns: | ||
- name: order_id | ||
tests: | ||
- unique | ||
- not_null | ||
description: This is a unique identifier for an order | ||
|
||
- name: customer_id | ||
description: Foreign key to the customers table | ||
tests: | ||
- not_null | ||
- relationships: | ||
to: ref('customers') | ||
field: customer_id | ||
|
||
- name: order_date | ||
description: Date (UTC) that the order was placed | ||
|
||
- name: status | ||
description: '{{ doc("orders_status") }}' | ||
tests: | ||
- accepted_values: | ||
values: [placed, shipped, completed, return_pending, returned] | ||
|
||
- name: amount | ||
description: Total amount (AUD) of the order | ||
tests: | ||
- not_null | ||
|
||
- name: credit_card_amount | ||
description: Amount of the order (AUD) paid for by credit card | ||
tests: | ||
- not_null | ||
|
||
- name: coupon_amount | ||
description: Amount of the order (AUD) paid for by coupon | ||
tests: | ||
- not_null | ||
|
||
- name: bank_transfer_amount | ||
description: Amount of the order (AUD) paid for by bank transfer | ||
tests: | ||
- not_null | ||
|
||
- name: gift_card_amount | ||
description: Amount of the order (AUD) paid for by gift card | ||
tests: | ||
- not_null | ||
- name: orders | ||
description: | ||
This table has basic information about orders, as well as some derived | ||
facts based on payments | ||
|
||
meta: | ||
output-to-lower: true | ||
|
||
columns: | ||
- name: order_id | ||
tests: | ||
- unique | ||
- not_null | ||
description: This is a unique identifier for an order | ||
|
||
- name: customer_id | ||
description: Foreign key to the customers table | ||
tests: | ||
- not_null | ||
- relationships: | ||
to: ref('customers') | ||
field: customer_id | ||
|
||
- name: order_date | ||
description: Date (UTC) that the order was placed | ||
|
||
- name: status | ||
description: '{{ doc("orders_status") }}' | ||
tests: | ||
- accepted_values: | ||
values: [placed, shipped, completed, return_pending, returned] | ||
|
||
- name: amount | ||
description: Total amount (AUD) of the order | ||
tests: | ||
- not_null | ||
|
||
- name: credit_card_amount | ||
description: Amount of the order (AUD) paid for by credit card | ||
tests: | ||
- not_null | ||
|
||
- name: coupon_amount | ||
description: Amount of the order (AUD) paid for by coupon | ||
tests: | ||
- not_null | ||
|
||
- name: bank_transfer_amount | ||
description: Amount of the order (AUD) paid for by bank transfer | ||
tests: | ||
- not_null | ||
|
||
- name: gift_card_amount | ||
description: Amount of the order (AUD) paid for by gift card | ||
tests: | ||
- not_null |
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
Oops, something went wrong.