view: content_nr_ownership_contributions { sql_table_name: FACTS.PROD.OWNERSHIP_NR_CONTRIBUTION ;; # ------------------------------------------------------------------------ # Primary Key # ------------------------------------------------------------------------ dimension: id { primary_key: yes type: string sql: ${TABLE}.ID ;; } # ------------------------------------------------------------------------ # Array Data # ------------------------------------------------------------------------ dimension: instruments { type: string sql: ARRAY_TO_STRING(${TABLE}.INSTRUMENTS, ', ') ;; description: "Comma-separated list of instruments linked to this contribution" } # ------------------------------------------------------------------------ # Status / Booleans # ------------------------------------------------------------------------ dimension: is_deleted { type: yesno sql: ${TABLE}.IS_DELETED ;; } # ------------------------------------------------------------------------ # Timestamps & Metadata # ------------------------------------------------------------------------ dimension_group: created_at { type: time timeframes: [raw, time, date, week, month, quarter, year] sql: ${TABLE}.CREATED_AT ;; } dimension: created_by { type: string sql: ${TABLE}.CREATED_BY ;; } dimension_group: last_modified_at { type: time timeframes: [raw, time, date, week, month, quarter, year] sql: ${TABLE}.LAST_MODIFIED_AT ;; } dimension: last_modified_by { type: string sql: ${TABLE}.LAST_MODIFIED_BY ;; } dimension_group: deleted_at { type: time timeframes: [raw, time, date, week, month, quarter, year] sql: ${TABLE}.DELETED_AT ;; } # ------------------------------------------------------------------------ # Measures # ------------------------------------------------------------------------ measure: count { type: count drill_fields: [id] } }