view: nr_contribution_contributed_to_nr_sound_recording { sql_table_name: FACTS.PROD.NR_CONTRIBUTION_CONTRIBUTED_TO_NR_SOUND_RECORDING ;; # ------------------------------------------------------------------------ # Primary Key (Composite) # ------------------------------------------------------------------------ # Looker requires a unique primary key to avoid fan-out issues in joins. dimension: pk { primary_key: yes hidden: yes type: string sql: CONCAT(${TABLE}.NR_CONTRIBUTION_ID, '-', ${TABLE}.NR_SOUND_RECORDING_ID) ;; } # ------------------------------------------------------------------------ # Foreign Keys / Core IDs # ------------------------------------------------------------------------ dimension: nr_contribution_id { type: string sql: ${TABLE}.NR_CONTRIBUTION_ID ;; } dimension: nr_sound_recording_id { type: string sql: ${TABLE}.NR_SOUND_RECORDING_ID ;; } # ------------------------------------------------------------------------ # Standard Dimensions # ------------------------------------------------------------------------ dimension: node_label { type: string sql: ${TABLE}.NODE_LABEL ;; } 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: [nr_contribution_id, nr_sound_recording_id, node_label] } }