diff --git a/dbt2looker/generator.py b/dbt2looker/generator.py index 9b95438..acd9a42 100644 --- a/dbt2looker/generator.py +++ b/dbt2looker/generator.py @@ -185,9 +185,13 @@ 'time', 'date', 'week', + 'day_of_week', 'month', + 'month_name', 'quarter', + 'quarter_of_year', 'year', + 'week_of_year', ] @@ -210,7 +214,7 @@ def lookml_date_time_dimension_group(column: models.DbtModelColumn, adapter_type 'sql': column.meta.dimension.sql or f'${{TABLE}}.{column.name}', 'description': column.meta.dimension.description or column.description, 'datatype': map_adapter_type_to_looker(adapter_type, column.data_type), - 'timeframes': ['raw', 'time', 'hour', 'date', 'week', 'month', 'quarter', 'year'] + 'timeframes': looker_timeframes } diff --git a/example/lookml/views/pages.view.lkml b/example/lookml/views/pages.view.lkml index d51e1cb..3bb21f0 100644 --- a/example/lookml/views/pages.view.lkml +++ b/example/lookml/views/pages.view.lkml @@ -9,12 +9,15 @@ view: pages { timeframes: [ raw, time, - hour, date, week, + day_of_week, month, + month_name, quarter, + quarter_of_year, year, + week_of_year, ] }