view: facts_prod_dim_period { sql_table_name: facts.prod.dim_period ;; dimension: period_id { type: number sql: ${TABLE}.periodid ;; primary_key: yes } dimension: month { type: number sql: ${TABLE}.month ;; } dimension: quarter { type: number sql: ${TABLE}.quarter ;; } dimension: year { type: number sql: ${TABLE}.year ;; } dimension_group: accounting { type: time sql: DATE_FROM_PARTS(${year}, ${month}, '01') ;; timeframes: [ date, month, month_num, month_name, quarter, quarter_of_year, year, fiscal_month_num, fiscal_quarter, fiscal_quarter_of_year, fiscal_year ] } dimension_group: activity { type: time sql: DATE_FROM_PARTS(${year}, ${month}, '01') ;; timeframes: [ date, month, month_num, month_name, quarter, quarter_of_year, year, fiscal_month_num, fiscal_quarter, fiscal_quarter_of_year, fiscal_year ] } }