generated from ramiz-bozai-dbt/snowflake_dbt_demo
-
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.
add conference mapping model and metrics
- Loading branch information
1 parent
b02a440
commit 28523b8
Showing
5 changed files
with
39 additions
and
1 deletion.
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,4 @@ | ||
select | ||
* | ||
|
||
from {{ ref('stg_conference_mapping') }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
semantic_models: | ||
- name: conference_mapping | ||
description: Mapping for NFL teams and the conference they belong to. | ||
defaults: | ||
model: ref('conference_mapping') | ||
|
||
entities: | ||
- name: team | ||
type: primary | ||
expr: team | ||
|
||
dimensions: | ||
- name: conference | ||
type: categorical | ||
expr: conference |
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,17 @@ | ||
with source as ( | ||
|
||
select * from {{ source('nfl', 'conference_mapping') }} | ||
|
||
), | ||
|
||
renamed as ( | ||
|
||
select | ||
tm as team, | ||
conf as conference | ||
|
||
from source | ||
|
||
) | ||
|
||
select * from renamed |