-
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 album and genre models with gold fact review addition (#16)
- Loading branch information
1 parent
49c6b4b
commit 1c6a21e
Showing
7 changed files
with
104 additions
and
101 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: 2 | ||
models: | ||
- name: gold_fact_review | ||
columns: | ||
- name: Album | ||
description: The album being rated | ||
data_type: string | ||
quote: true | ||
- name: Artist | ||
description: The album artist | ||
data_type: string | ||
quote: true | ||
- name: Release Year | ||
description: The year of release | ||
data_type: int | ||
quote: true | ||
- name: Genres | ||
description: The genres of the album | ||
data_type: string | ||
quote: true | ||
- name: My Rating | ||
description: The rating I gave | ||
data_type: bigint | ||
quote: true | ||
- name: Global Rating | ||
description: The global rating | ||
data_type: double | ||
quote: true | ||
- name: My Relative Rating | ||
description: My rating indexed against the global rating | ||
data_type: decimal(5,2) | ||
quote: true | ||
- name: Review Date | ||
description: The date of the review | ||
data_type: date | ||
quote: 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,49 @@ | ||
version: 2 | ||
models: | ||
- name: silver_dim_album | ||
description: a dimension table of all albums reviewed | ||
columns: | ||
- name: youtube_id | ||
description: The PK of the table, the YouTube album ID | ||
data_type: string | ||
tests: | ||
- not_null | ||
- unique | ||
- name: spotify_id | ||
description: The Spotify album ID | ||
data_type: string | ||
- name: apple_music_id | ||
description: The Apple Music album ID | ||
data_type: string | ||
- name: tidal_id | ||
description: The Tidal album ID | ||
data_type: string | ||
- name: amazon_music_id | ||
description: The Amazon Music album ID | ||
data_type: string | ||
- name: qobuz_id | ||
description: The Qobuz album ID | ||
data_type: string | ||
- name: deezer_id | ||
description: The Deezer album ID | ||
data_type: string | ||
- name: album | ||
description: The name of the album | ||
data_type: string | ||
tests: | ||
- not_null | ||
- name: artist | ||
description: The name of the album artist | ||
data_type: string | ||
tests: | ||
- not_null | ||
- name: release_date | ||
description: Year that the album was released | ||
data_type: string | ||
tests: | ||
- not_null | ||
- name: wikipedia_url | ||
description: URL of the Wikipedia article for this album | ||
data_type: string | ||
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
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,14 @@ | ||
version: 2 | ||
models: | ||
- name: silver_dim_genre | ||
description: a dimension table of all genres | ||
columns: | ||
- name: youtube_id | ||
description: The YouTube album ID | ||
data_type: string | ||
- name: genres | ||
description: The genre of the album | ||
data_type: string | ||
- name: subgenre | ||
description: The subgenre of the album | ||
data_type: string |