Skip to content

Commit

Permalink
Give fiscal_quarter a column_name property
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Oct 2, 2024
1 parent 3132267 commit a3cdaec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"editor.defaultFormatter": "dorzey.vscode-sqlfluff",
"editor.formatOnSave": false
},
"editor.acceptSuggestionOnEnter": true,
"editor.acceptSuggestionOnEnter": "on",
"editor.quickSuggestions": {
"other": false,
"comments": false,
Expand Down
1 change: 1 addition & 0 deletions models/marts/_models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ models:
standard_granularity_column: date_day # column for the standard grain of your table
custom_granularities:
- name: fiscal_quarter
column_name: almost_fiscal_quarter
columns:
- name: date_day
granularity: day # set granularity at column-level for standard_granularity_column
Expand Down
2 changes: 1 addition & 1 deletion models/marts/time_spine.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cast_to_date as (

select
cast(date_day as date) as date_day,
date_trunc('quarter', date_day) as fiscal_quarter
date_trunc('quarter', date_day) as almost_fiscal_quarter

from days

Expand Down

0 comments on commit a3cdaec

Please sign in to comment.