Skip to content

Commit 03ef087

Browse files
Merge pull request #9 from Ritik574-coder/dbt_branch
Implement domain-driven intermediate layer and project restructuring
2 parents d5edaef + 28c723b commit 03ef087

63 files changed

Lines changed: 13143 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dbt_project.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@ vars:
2525

2626
models:
2727
dbt_analytics_engineering:
28+
2829
staging:
29-
+materialized: table
30+
+materialized: view
3031
+tags: ["staging", "bronze"]
32+
3133
intermediate:
3234
+materialized: table
3335
+tags: ["intermediate", "silver"]
36+
3437
marts:
35-
+materialized: view
38+
+materialized: table
3639
+tags: ["marts", "gold"]
3740

3841
seeds:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
SELECT
2+
customer_id,
3+
address,
4+
city,
5+
state_abbr,
6+
state,
7+
zip_code,
8+
country,
9+
region
10+
FROM {{ ref('stg_customers') }} ;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
SELECT
2+
customer_id,
3+
title,
4+
first_name,
5+
last_name,
6+
gender,
7+
date_of_birth
8+
FROM {{ ref('stg_customers') }} ;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
SELECT
2+
customer_id,
3+
customer_segment,
4+
loyalty_points,
5+
annual_income_usd,
6+
company,
7+
is_active,
8+
account_created_date
9+
FROM {{ ref('stg_customers') }} ;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
SELECT
2+
customer_id,
3+
email,
4+
phone,
5+
preferred_channel
6+
FROM {{ ref('stg_customers') }} ;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
SELECT
2+
employee_id,
3+
job_title,
4+
department,
5+
store_id,
6+
store_name,
7+
store_city,
8+
annual_salary_usd,
9+
commission_rate_pct,
10+
performance_rating,
11+
years_employed,
12+
manager_id,
13+
is_active
14+
FROM {{ ref('stg_employees') }} ;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
SELECT
2+
employee_id,
3+
first_name,
4+
last_name,
5+
hire_date
6+
FROM {{ ref('stg_employees') }} ;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
SELECT
2+
employee_id,
3+
email,
4+
phone
5+
FROM {{ ref('stg_employees') }} ;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
SELECT
2+
snapshot_date,
3+
product_id,
4+
product_name,
5+
sku,
6+
category
7+
FROM {{ ref('stg_inventory') }} ;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
SELECT
2+
snapshot_date,
3+
product_id,
4+
stock_on_hand,
5+
stock_reserved,
6+
stock_available,
7+
reorder_level
8+
FROM {{ ref('stg_inventory') }} ;

0 commit comments

Comments
 (0)