view: customer_master_master { sql_table_name: ORCHARD_APP_REPORTING_V2.ART_RELATIONS_PROD_ART_RELATIONS.CUSTOMER_MASTER_MASTER ;; # ========================================================================= # 1. PRIMARY KEY & CORE IDENTITY # ========================================================================= dimension: customer_master_master_id { primary_key: yes type: number sql: ${TABLE}.CUSTOMER_MASTER_MASTER_ID ;; label: "Customer Master ID" description: "The unique primary identifier for the master customer account." } dimension: customer_name { type: string label: "Customer Name" description: "The official master name of the customer account (e.g., SENA)." sql: ${TABLE}.CUSTOMER_NAME ;; case_sensitive: no } dimension: status { type: string label: "Account Status" description: "The active, operational, or lifecycle status of the customer account profile." sql: ${TABLE}.STATUS ;; } # ========================================================================= # 2. DELIVERY & INTEGRATION CODES # ========================================================================= dimension: sony_dms_code { type: string label: "Sony DMS Code" group_label: "Integration Codes" description: "The associated Sony Distribution Management System identifier." sql: ${TABLE}.SONY_DMS_CODE ;; } dimension: ci_dms_code { type: string label: "CI DMS Code" group_label: "Integration Codes" description: "The associated Consolidated Independent Distribution Management System identifier." sql: ${TABLE}.CI_DMS_CODE ;; } dimension: ddex_party_id { type: string label: "DDEX Party ID" group_label: "Integration Codes" description: "The global Digital Data Exchange (DDEX) unique partner standard identifier." sql: ${TABLE}.DDEX_PARTY_ID ;; } dimension: product_type_id { type: string label: "Product Type ID" group_label: "Integration Codes" description: "Categorical ID map governing the type of product assets managed under this account." sql: ${TABLE}.PRODUCT_TYPE_ID ;; } dimension: delivery_option { type: string label: "Delivery Option" group_label: "Delivery Metrics & Options" description: "The active delivery distribution strategy configured for the client channel." sql: ${TABLE}.DELIVERY_OPTION ;; } dimension: mv_delivery_option { type: string label: "MV Delivery Option" group_label: "Delivery Metrics & Options" description: "Music Video specific distribution configuration delivery settings." sql: ${TABLE}.MV_DELIVERY_OPTION ;; } dimension: show_delivery_info { type: string label: "Show Delivery Info Flag" group_label: "Delivery Metrics & Options" description: "Determines if distribution status visibility prompts display on user frontends." sql: ${TABLE}.SHOW_DELIVERY_INFO ;; } dimension: encoding_order_status { type: string label: "Encoding Order Status" group_label: "Delivery Metrics & Options" description: "The manufacturing/encoding pipeline state for audio/video asset files." sql: ${TABLE}.ENCODING_ORDER_STATUS ;; } dimension: label_store { type: string label: "Label Store" group_label: "Delivery Metrics & Options" description: "Specific destination storefront target mappings for client label drops." sql: ${TABLE}.LABEL_STORE ;; } # ========================================================================= # 3. OPERATION BOUNDARIES / LIMITS & CAPS # ========================================================================= dimension: delivery_cap { type: number label: "Delivery Cap" group_label: "Throttling & Volume Limits" description: "The absolute transaction constraint cap mapped to parallel delivery queues." sql: ${TABLE}.DELIVERY_CAP ;; } dimension: weekly_limit { type: number label: "Weekly Submission Limit" group_label: "Throttling & Volume Limits" description: "The maximum batch allocation volume permitted per rolling 7-day work week window." sql: ${TABLE}.WEEKLY_LIMIT ;; } dimension: eo_limit { type: number label: "EO Limit" group_label: "Throttling & Volume Limits" description: "Encoding Order throttling constraint limits allocated to the profile." sql: ${TABLE}.EO_LIMIT ;; } # ========================================================================= # 4. GENRE & CONTENT MANAGEMENT CONSTRAINTS # ========================================================================= dimension: required_genre_code { type: string label: "Required Genre Code" group_label: "Content Constraints" description: "Mandatory system classification filter applied at recording intake levels." sql: ${TABLE}.REQUIRED_GENRE_CODE ;; } dimension: required_subgenre_code { type: string label: "Required Subgenre Code" group_label: "Content Constraints" description: "Granular mandatory secondary subcategory tag code constraints." sql: ${TABLE}.REQUIRED_SUBGENRE_CODE ;; } dimension: required_subgenre { type: string label: "Required Subgenre Description" group_label: "Content Constraints" description: "The textual name expression of the required fallback subgenre profile." sql: ${TABLE}.REQUIRED_SUBGENRE ;; } dimension: instant_grat { type: string label: "Instant Gratification Support" group_label: "Content Constraints" description: "Tracks enablement rules for client pre-order promotional asset tracks." sql: ${TABLE}.INSTANT_GRAT ;; } dimension: hd_only { type: string label: "HD Only Flag" group_label: "Content Constraints" description: "Enforces whether video content payloads mandate High Definition asset restrictions." sql: ${TABLE}.HD_ONLY ;; } dimension: exclusive_audio_content { type: string label: "Exclusive Audio Content Mode" group_label: "Content Constraints" description: "Exposes restriction logic regarding track licensing windows or streaming ecosystem exclusions." sql: ${TABLE}.EXCLUSIVE_AUDIO_CONTENT ;; } # ========================================================================= # 5. SYSTEM FUNCTIONAL SUPPORT FLAGS # ========================================================================= dimension: supports_timed_release { type: string label: "Supports Timed Release" group_label: "Feature Flags: Timed Release" description: "Flag detailing eligibility to execute midnight local-time or absolute global-time distribution configurations." sql: ${TABLE}.SUPPORTS_TIMED_RELEASE ;; } dimension: supports_timed_release_updated_by { type: number label: "Timed Release Configured By (ID)" group_label: "Feature Flags: Timed Release" description: "User reference ID who last modified the timed release configuration rule state." sql: ${TABLE}.SUPPORTS_TIMED_RELEASE_UPDATED_BY ;; hidden: yes } dimension: supports_localization { type: string label: "Supports Localization" group_label: "Feature Flags: Localization" description: "Flag describing if localized text script translation inputs are permitted for store variations." sql: ${TABLE}.SUPPORTS_LOCALIZATION ;; } dimension: supports_localization_updated_by { type: number label: "Localization Configured By (ID)" group_label: "Feature Flags: Localization" description: "User reference ID who last modified the localization parameter criteria status." sql: ${TABLE}.SUPPORTS_LOCALIZATION_UPDATED_BY ;; hidden: yes } dimension: is_user_defined_contributors_supported { type: string label: "Supports User-Defined Contributors" group_label: "Feature Flags: Custom Contributors" description: "Validates whether custom client participant metadata entries bypass static role lists." sql: ${TABLE}.IS_USER_DEFINED_CONTRIBUTORS_SUPPORTED ;; } dimension: is_user_defined_contributors_supported_updated_by { type: number label: "Custom Contributors Configured By (ID)" group_label: "Feature Flags: Custom Contributors" description: "User reference ID who changed permissions relating to user-defined metadata inputs." sql: ${TABLE}.IS_USER_DEFINED_CONTRIBUTORS_SUPPORTED_UPDATED_BY ;; hidden: yes } # ========================================================================= # 6. SYSTEM LIFECYCLE TIMESTAMPS # ========================================================================= dimension_group: optin { type: time timeframes: [date, week, month, quarter, year] datatype: date sql: ${TABLE}.OPTIN_DATE ;; label: "Account Opt-In" description: "The historical timeline reference logging when the master account was turned live." } dimension_group: supports_timed_release_last_updated { type: time timeframes: [raw, date, week, month, year] datatype: timestamp sql: ${TABLE}.SUPPORTS_TIMED_RELEASE_LAST_UPDATED ;; group_label: "Feature Flags: Timed Release" label: "Timed Release Status Changed" } dimension_group: supports_localization_updated_by_date_time { type: time timeframes: [raw, date, week, month, year] datatype: timestamp sql: ${TABLE}.SUPPORTS_LOCALIZATION_UPDATED_BY_DATE_TIME ;; group_label: "Feature Flags: Localization" label: "Localization Status Changed" } dimension_group: is_user_defined_contributors_supported_last_updated { type: time timeframes: [raw, date, week, month, year] datatype: timestamp sql: ${TABLE}.IS_USER_DEFINED_CONTRIBUTORS_SUPPORTED_LAST_UPDATED ;; group_label: "Feature Flags: Custom Contributors" label: "Custom Contributors Status Changed" } dimension: updated_by { type: number sql: ${TABLE}.UPDATED_BY ;; group_label: "Record History Logs" description: "The primary internal user reference footprint ID responsible for the latest save state modification." } dimension_group: updated_on { type: time timeframes: [raw, time, date, week, month, year] datatype: timestamp sql: ${TABLE}.UPDATED_ON ;; group_label: "Record History Logs" label: "Record Modification Signature" } # ========================================================================= # 7. SYSTEM METADATA TIMESTAMPS (Fivetran Pipeline Tracking - Hidden) # ========================================================================= dimension: _fivetran_deleted { type: yesno sql: ${TABLE}._FIVETRAN_DELETED ;; group_label: "System Metadata" hidden: yes } dimension_group: _fivetran_synced { type: time timeframes: [raw, date] datatype: timestamp sql: ${TABLE}._FIVETRAN_SYNCED ;; group_label: "System Metadata" hidden: yes } # ========================================================================= # 8. ANALYTICAL MEASURES # ========================================================================= measure: customer_count { type: count_distinct sql: ${customer_master_master_id} ;; description: "The count of unique master customer accounts logged in the registry." } }