view: content_nr_ownership_monetizable { sql_table_name: FACTS.PROD.NR_SOUND_RECORDING_HAS_MONETIZE_RULE_OWNERSHIP_SERVICE ;; # ------------------------------------------------------------------------ # Primary Key # ------------------------------------------------------------------------ dimension: id { primary_key: yes type: string sql: ${TABLE}.ID ;; } # ------------------------------------------------------------------------ # Core IDs / Foreign Keys # ------------------------------------------------------------------------ dimension: nr_sound_recording_id { type: string sql: ${TABLE}.NR_SOUND_RECORDING_ID ;; } dimension: nr_ownership_service_id { type: string sql: ${TABLE}.NR_OWNERSHIP_SERVICE_ID ;; } dimension: vendor_id { label: "Vendor ID" type: number sql: ${TABLE}.VENDOR_ID ;; value_format_name: id } dimension: subaccount_id { label: "Subaccount ID" type: number sql: ${TABLE}.SUBACCOUNT_ID ;; value_format_name: id } # ------------------------------------------------------------------------ # Ownership Rules & Rules Attributes # ------------------------------------------------------------------------ dimension: percentage { type: number sql: ${TABLE}.PERCENTAGE ;; value_format_name: percent_2 description: "Monetization share percentage" } # ------------------------------------------------------------------------ # Status / Booleans # ------------------------------------------------------------------------ dimension: is_deleted { type: yesno sql: ${TABLE}.IS_DELETED ;; } # ------------------------------------------------------------------------ # Dates & Timestamps # ------------------------------------------------------------------------ dimension_group: start { type: time timeframes: [date, week, month, quarter, year] convert_tz: no # Recommended for pure DATE types to prevent shift anomalies datatype: date sql: ${TABLE}.START_DATE ;; } dimension_group: end { type: time timeframes: [date, week, month, quarter, year] convert_tz: no datatype: date sql: ${TABLE}.END_DATE ;; } 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: created_by_identity_id { type: string sql: ${TABLE}.CREATED_BY_IDENTITY_ID ;; } 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: last_modified_by_identity_id { type: string sql: ${TABLE}.LAST_MODIFIED_BY_IDENTITY_ID ;; } 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, nr_sound_recording_id, nr_ownership_service_id] } }