-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finish implementing initial support for DuckDB
- Loading branch information
1 parent
9b13827
commit f51b08d
Showing
9 changed files
with
360 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
sources: | ||
- name: customers | ||
columns: | ||
- name: customer_id | ||
description: "" | ||
data_type: INTEGER | ||
tests: [] | ||
- name: first_name | ||
description: "" | ||
data_type: VARCHAR | ||
tests: [] | ||
- name: last_name | ||
description: "" | ||
data_type: VARCHAR | ||
tests: [] | ||
- name: first_order | ||
description: "" | ||
data_type: DATE | ||
tests: [] | ||
- name: most_recent_order | ||
description: "" | ||
data_type: DATE | ||
tests: [] | ||
- name: number_of_orders | ||
description: "" | ||
data_type: BIGINT | ||
tests: [] | ||
- name: customer_lifetime_value | ||
description: "" | ||
data_type: DOUBLE | ||
tests: [] | ||
- name: orders | ||
columns: | ||
- name: order_id | ||
description: "" | ||
data_type: INTEGER | ||
tests: [] | ||
- name: customer_id | ||
description: "" | ||
data_type: INTEGER | ||
tests: [] | ||
- name: order_date | ||
description: "" | ||
data_type: DATE | ||
tests: [] | ||
- name: status | ||
description: "" | ||
data_type: VARCHAR | ||
tests: [] | ||
- name: credit_card_amount | ||
description: "" | ||
data_type: DOUBLE | ||
tests: [] | ||
- name: coupon_amount | ||
description: "" | ||
data_type: DOUBLE | ||
tests: [] | ||
- name: bank_transfer_amount | ||
description: "" | ||
data_type: DOUBLE | ||
tests: [] | ||
- name: gift_card_amount | ||
description: "" | ||
data_type: DOUBLE | ||
tests: [] | ||
- name: amount | ||
description: "" | ||
data_type: DOUBLE | ||
tests: [] | ||
- name: raw_customers | ||
columns: | ||
- name: id | ||
description: "" | ||
data_type: INTEGER | ||
tests: [] | ||
- name: first_name | ||
description: "" | ||
data_type: VARCHAR | ||
tests: [] | ||
- name: last_name | ||
description: "" | ||
data_type: VARCHAR | ||
tests: [] | ||
- name: raw_orders | ||
columns: | ||
- name: id | ||
description: "" | ||
data_type: INTEGER | ||
tests: [] | ||
- name: user_id | ||
description: "" | ||
data_type: INTEGER | ||
tests: [] | ||
- name: order_date | ||
description: "" | ||
data_type: DATE | ||
tests: [] | ||
- name: status | ||
description: "" | ||
data_type: VARCHAR | ||
tests: [] | ||
- name: raw_payments | ||
columns: | ||
- name: id | ||
description: "" | ||
data_type: INTEGER | ||
tests: [] | ||
- name: order_id | ||
description: "" | ||
data_type: INTEGER | ||
tests: [] | ||
- name: payment_method | ||
description: "" | ||
data_type: VARCHAR | ||
tests: [] | ||
- name: amount | ||
description: "" | ||
data_type: INTEGER | ||
tests: [] | ||
- name: stg_customers | ||
columns: | ||
- name: customer_id | ||
description: "" | ||
data_type: INTEGER | ||
tests: [] | ||
- name: first_name | ||
description: "" | ||
data_type: VARCHAR | ||
tests: [] | ||
- name: last_name | ||
description: "" | ||
data_type: VARCHAR | ||
tests: [] | ||
- name: stg_orders | ||
columns: | ||
- name: order_id | ||
description: "" | ||
data_type: INTEGER | ||
tests: [] | ||
- name: customer_id | ||
description: "" | ||
data_type: INTEGER | ||
tests: [] | ||
- name: order_date | ||
description: "" | ||
data_type: DATE | ||
tests: [] | ||
- name: status | ||
description: "" | ||
data_type: VARCHAR | ||
tests: [] | ||
- name: stg_payments | ||
columns: | ||
- name: payment_id | ||
description: "" | ||
data_type: INTEGER | ||
tests: [] | ||
- name: order_id | ||
description: "" | ||
data_type: INTEGER | ||
tests: [] | ||
- name: payment_method | ||
description: "" | ||
data_type: VARCHAR | ||
tests: [] | ||
- name: amount | ||
description: "" | ||
data_type: DOUBLE | ||
tests: [] |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
with | ||
|
||
source as ( | ||
|
||
select * from {{ ref('customers') }} | ||
|
||
), | ||
|
||
renamed as ( | ||
|
||
select | ||
-- datetimes | ||
first_order as first_order, | ||
most_recent_order as most_recent_order, | ||
|
||
-- numbers | ||
customer_id as customer_id, | ||
number_of_orders as number_of_orders, | ||
|
||
-- text | ||
first_name as first_name, | ||
last_name as last_name, | ||
|
||
from source | ||
) | ||
|
||
select * from renamed |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
with | ||
|
||
source as ( | ||
|
||
select * from {{ ref('orders') }} | ||
|
||
), | ||
|
||
renamed as ( | ||
|
||
select | ||
-- datetimes | ||
order_date as order_date, | ||
|
||
-- numbers | ||
order_id as order_id, | ||
customer_id as customer_id, | ||
|
||
-- text | ||
status as status, | ||
|
||
from source | ||
) | ||
|
||
select * from renamed |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
with | ||
|
||
source as ( | ||
|
||
select * from {{ ref('raw_customers') }} | ||
|
||
), | ||
|
||
renamed as ( | ||
|
||
select | ||
-- numbers | ||
id as id, | ||
|
||
-- text | ||
first_name as first_name, | ||
last_name as last_name, | ||
|
||
from source | ||
) | ||
|
||
select * from renamed |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
with | ||
|
||
source as ( | ||
|
||
select * from {{ ref('raw_orders') }} | ||
|
||
), | ||
|
||
renamed as ( | ||
|
||
select | ||
-- datetimes | ||
order_date as order_date, | ||
|
||
-- numbers | ||
id as id, | ||
user_id as user_id, | ||
|
||
-- text | ||
status as status, | ||
|
||
from source | ||
) | ||
|
||
select * from renamed |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
with | ||
|
||
source as ( | ||
|
||
select * from {{ ref('raw_payments') }} | ||
|
||
), | ||
|
||
renamed as ( | ||
|
||
select | ||
-- numbers | ||
id as id, | ||
order_id as order_id, | ||
amount as amount, | ||
|
||
-- text | ||
payment_method as payment_method, | ||
|
||
from source | ||
) | ||
|
||
select * from renamed |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
with | ||
|
||
source as ( | ||
|
||
select * from {{ ref('stg_customers') }} | ||
|
||
), | ||
|
||
renamed as ( | ||
|
||
select | ||
-- numbers | ||
customer_id as customer_id, | ||
|
||
-- text | ||
first_name as first_name, | ||
last_name as last_name, | ||
|
||
from source | ||
) | ||
|
||
select * from renamed |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
with | ||
|
||
source as ( | ||
|
||
select * from {{ ref('stg_orders') }} | ||
|
||
), | ||
|
||
renamed as ( | ||
|
||
select | ||
-- datetimes | ||
order_date as order_date, | ||
|
||
-- numbers | ||
order_id as order_id, | ||
customer_id as customer_id, | ||
|
||
-- text | ||
status as status, | ||
|
||
from source | ||
) | ||
|
||
select * from renamed |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
with | ||
|
||
source as ( | ||
|
||
select * from {{ ref('stg_payments') }} | ||
|
||
), | ||
|
||
renamed as ( | ||
|
||
select | ||
-- numbers | ||
payment_id as payment_id, | ||
order_id as order_id, | ||
|
||
-- text | ||
payment_method as payment_method, | ||
|
||
from source | ||
) | ||
|
||
select * from renamed |