Skip to content

Commit 3129087

Browse files
committed
models and materialization
1 parent 30b061a commit 3129087

File tree

6 files changed

+64
-2
lines changed

6 files changed

+64
-2
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"git.ignoreLimitWarning": true
2+
"git.ignoreLimitWarning": true,
3+
"dbt.queryLimit": 500
34
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
WITH raw_hosts AS (
2+
SELECT
3+
*
4+
FROM
5+
AIRBNB.RAW.RAW_HOSTS
6+
)
7+
SELECT
8+
id AS host_id,
9+
NAME AS host_name,
10+
is_superhost,
11+
created_at,
12+
updated_at
13+
FROM
14+
raw_hosts
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
WITH raw_listings AS (
2+
SELECT
3+
*
4+
FROM
5+
AIRBNB.RAW.RAW_LISTINGS
6+
)
7+
SELECT
8+
id AS listing_id,
9+
name AS listing_name,
10+
listing_url,
11+
room_type,
12+
minimum_nights,
13+
host_id,
14+
price AS price_str,
15+
created_at,
16+
updated_at
17+
FROM
18+
raw_listings
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
WITH raw_reviews AS (
2+
SELECT
3+
*
4+
FROM
5+
AIRBNB.RAW.RAW_REVIEWS
6+
)
7+
SELECT
8+
listing_id,
9+
date AS review_date,
10+
reviewer_name,
11+
comments AS review_text,
12+
sentiment AS review_sentiment
13+
FROM
14+
raw_reviews

dbt/dbt-udemy-course/models.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### Models
2+
SQL definitions that materliaze as tables and views and contain all business logics.
3+
4+
#### SRC models
5+
[src_hosts](/Users/debolbac/Documents/GitHub/Data-Engineering/dbt/dbt-udemy-course/dbt-course-udemy/dbt_project/models/src/src_hosts.sql)
6+
[src_listings](/Users/debolbac/Documents/GitHub/Data-Engineering/dbt/dbt-udemy-course/dbt-course-udemy/dbt_project/models/src/src_listings.sql)
7+
[src_reviews](/Users/debolbac/Documents/GitHub/Data-Engineering/dbt/dbt-udemy-course/dbt-course-udemy/dbt_project/models/src/src_reviews.sql)
8+
9+
### Materializations
10+
4 types:
11+
* view
12+
* table
13+
* Incremental (append only)
14+
* Ephemeral (create CTE)

dbt/dbt-udemy-course/readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
[Course Link](https://github.com/nordquant/complete-dbt-bootcamp-zero-to-hero/blob/main/_course_resources/course-resources.md)
33
[Snowflake Instance](https://supypql-om48075.snowflakecomputing.com/console/login)
44

5-
### [Setup the course](./setup.md)
5+
### [Setup the course](./setup.md)
6+
### [Models](./models.md)

0 commit comments

Comments
 (0)