label: "KNR Models" connection: "knr-looker" # Core Asset Registry Inclusions include: "/views/performance_nr_contribution.view.lkml" include: "/views/performance_nr_contributor.view.lkml" include: "/views/performance_nr_particpant.view.lkml" include: "/views/performance_nr_sound_recording.view.lkml" include: "/views/nr_sound_recording_has_featured_artist_nr_participant.view.lkml" include: "/views/nr_sound_recording_has_primary_artist_nr_participant.view.lkml" include: "/views/nr_contribution_contributed_to_nr_sound_recording.view.lkml" include: "/views/nr_contribution_type.view.lkml" include: "/views/nr_contribution_instruments_multi_row.view.lkml" # 🌟 Salesforce CRM View Inclusion include: "/views/performer_salesforce_contributor.view.lkml" # ========================================================================= # EXPLORE: PERFORMER SALESFORCE CRM MATRIX (FULLY CONNECTED) # ========================================================================= explore: performer_salesforce_matrix { hidden: no label: "Performer Content & Salesforce Matrix" description: "Bridges physical neighboring rights content distributions directly with operational Salesforce CRM profile states, banking data, and legal milestones." # Establishes your core transactional baseline view_name: performance_nr_contribution # 1. Link Contribution to Contribution Type join: nr_contribution_type { type: left_outer relationship: many_to_one sql_on: ${performance_nr_contribution.id} = ${nr_contribution_type.nr_contribution_id} ;; } # 2. Link Contribution Type to Contributor join: performance_nr_contributor { type: left_outer relationship: many_to_one sql_on: ${nr_contribution_type.nr_contributor_id} = ${performance_nr_contributor.id} ;; } # ========================================================================= # 🌟 NEWLY INJECTED: SALESFORCE ACCOUNT RELATIONSHIP LAYER # ========================================================================= # One master Salesforce account directory row maps to many distinct catalog contributions over time. join: performer_salesforce_contributor { type: left_outer relationship: many_to_one view_label: "Salesforce CRM Profile" sql_on: ${performance_nr_contributor.id} = ${performer_salesforce_contributor.contributor_uuid_c} ;; } # 3. Join Contribution to the Sound Recording Bridge Table join: nr_contribution_contributed_to_nr_sound_recording { type: left_outer relationship: one_to_many sql_on: ${performance_nr_contribution.id} = ${nr_contribution_contributed_to_nr_sound_recording.nr_contribution_id} ;; } # 4. Join Bridge Table to the Sound Recording join: performance_nr_sound_recording { type: left_outer relationship: many_to_one sql_on: ${nr_contribution_contributed_to_nr_sound_recording.nr_sound_recording_id} = ${performance_nr_sound_recording.id} ;; } # 5. Join Sound Recording to Featured Artist Bridge Table join: nr_sound_recording_has_featured_artist_nr_participant { type: left_outer relationship: one_to_many sql_on: ${performance_nr_sound_recording.id} = ${nr_sound_recording_has_featured_artist_nr_participant.nr_sound_recording_id} ;; } # 6. Join Sound Recording to Primary Artist Bridge Table join: nr_sound_recording_has_primary_artist_nr_participant { type: left_outer relationship: one_to_many sql_on: ${performance_nr_sound_recording.id} = ${nr_sound_recording_has_primary_artist_nr_participant.nr_sound_recording_id} ;; } # --- ALIASED PARTICIPANT JOINS --- # 7a. Featured Artist Participant (Aliased from performance_nr_particpant) join: featured_artist_participant { from: performance_nr_particpant view_label: "Featured Artist" type: left_outer relationship: many_to_one sql_on: ${nr_sound_recording_has_featured_artist_nr_participant.nr_participant_id} = ${featured_artist_participant.id} ;; } # 7b. Primary Artist Participant (Aliased from performance_nr_particpant) join: primary_artist_participant { from: performance_nr_particpant view_label: "Primary Artist" type: left_outer relationship: many_to_one sql_on: ${nr_sound_recording_has_primary_artist_nr_participant.nr_participant_id} = ${primary_artist_participant.id} ;; } # 8. Join multi-row granular instrument parameters join: nr_performance_nr_contribution_multi_row { type: left_outer relationship: one_to_many view_label: "Instruments (Row Level)" sql_on: ${performance_nr_contribution.id} = ${nr_performance_nr_contribution_multi_row.contribution_id} ;; } }