-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor dbt project structure and add silver fact review model (#17)
- Loading branch information
1 parent
1c6a21e
commit 5e14535
Showing
6 changed files
with
75 additions
and
67 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 |
---|---|---|
@@ -1,12 +1,16 @@ | ||
name: 'ajc' | ||
name: 'ajc_dbt' | ||
|
||
version: '0.0.1' | ||
|
||
profile: 'ajc_adb_dbt_all_purpose' | ||
model-paths: ["models"] | ||
seed-paths: ["seeds"] | ||
|
||
clean-targets: | ||
- "target" | ||
- "dbt_packages" | ||
|
||
models: | ||
+persist_docs: | ||
relation: true | ||
columns: true | ||
columns: true |
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,26 @@ | ||
version: 2 | ||
|
||
sources: | ||
- name: albums | ||
schema: albums | ||
tables: | ||
- name: ajc_albums | ||
|
||
models: | ||
- name: bronze_albums | ||
description: a bronze dbt model of the raw albums info | ||
columns: | ||
- name: currentAlbum | ||
data_type: struct<amazonmusicid:string,applemusicid:string,artist:string,artistorigin:string,deezerid:string,genres:array<string>,globalreviewsurl:string,images:array<struct<height:bigint,url:string,width:bigint>>,name:string,qobuzid:string,releasedate:string,slug:string,spotifyid:string,subgenres:array<string>,tidalid:bigint,wikipediaurl:string,youtubemusicid:string> | ||
- name: currentAlbumNotes | ||
data_type: string | ||
- name: history | ||
data_type: array<struct<album:struct<amazonmusicid:string,applemusicid:string,artist:string,artistorigin:string,deezerid:string,genres:array<string>,globalreviewsurl:string,images:array<struct<height:bigint,url:string,width:bigint>>,name:string,qobuzid:string,releasedate:string,slug:string,spotifyid:string,subgenres:array<string>,tidalid:bigint,wikipediaurl:string,youtubemusicid:string>,generatedat:string,globalrating:double,rating:bigint,revealedalbum:boolean,review:string>> | ||
- name: name | ||
data_type: string | ||
- name: shareableUrl | ||
data_type: string | ||
- name: updateFrequency | ||
data_type: string | ||
- name: load_timestamp | ||
data_type: timestamp |
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: 2 | ||
models: | ||
- name: silver_fact_review | ||
description: a fact table of album review measures | ||
columns: | ||
- name: youtube_id | ||
description: The PK of the table, the YouTube album ID | ||
data_type: string | ||
tests: | ||
- not_null | ||
- unique | ||
- name: my_rating | ||
description: My rating | ||
data_type: bigint | ||
tests: | ||
- accepted_values: | ||
values: | ||
- "1" | ||
- "2" | ||
- "3" | ||
- "4" | ||
- "5" | ||
- name: global_rating | ||
description: The global rating | ||
data_type: double | ||
- name: review_date | ||
description: The date when the review was logged | ||
data_type: date | ||
tests: | ||
- not_null |