view: content_nr_ownership_contributor { sql_table_name: FACTS.PROD.OWNERSHIP_NR_CONTRIBUTOR ;; # ------------------------------------------------------------------------ # Primary Key # ------------------------------------------------------------------------ dimension: id { primary_key: yes type: string sql: ${TABLE}.ID ;; } # ------------------------------------------------------------------------ # Contributor Descriptive Attributes # ------------------------------------------------------------------------ dimension: name { type: string sql: ${TABLE}.NAME ;; description: "Full or display name of the ownership contributor" } dimension: forename { type: string sql: ${TABLE}.FORENAME ;; } dimension: surname { type: string sql: ${TABLE}.SURNAME ;; } # ------------------------------------------------------------------------ # Array Configurations # ------------------------------------------------------------------------ dimension: middle_names { type: string sql: ARRAY_TO_STRING(${TABLE}.MIDDLE_NAMES, ' ') ;; description: "Space-separated list of middle names" } # ------------------------------------------------------------------------ # Status / Booleans # ------------------------------------------------------------------------ dimension: is_deleted { type: yesno sql: ${TABLE}.IS_DELETED ;; } # ------------------------------------------------------------------------ # Timestamps & Audit 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, name, forename, surname] } }