# Define the database connection to be used for this model. connection: "digitalbi" # include all the views include: "/views/**/*.view" # Datagroups define a caching policy for an Explore. To learn more, # use the Quick Help panel on the right to see documentation. datagroup: digitalbi_default_datagroup { # sql_trigger: SELECT MAX(id) FROM etl_log;; max_cache_age: "1 hour" } persist_with: digitalbi_default_datagroup # Explores allow you to join together different views (database tables) based on the # relationships between fields. By joining a view into an Explore, you make those # fields available to users for data analysis. # Explores should be purpose-built for specific use cases. # To see the Explore you’re building, navigate to the Explore menu and select an Explore under "Digitalbi" # To create more sophisticated Explores that involve multiple views, you can use the join parameter. # Typically, join parameters require that you define the join type, join relationship, and a sql_on clause. # Each joined view also needs to define a primary key. explore: salesforce_lead { sql_always_where: ${internal_user}=false and ${ti_dbcloud_portal_id}<>'';; join: crm_account { sql_on:${salesforce_lead.ti_dbcloud_portal_id}=${crm_account.ti_dbcloud_portal_id} ;; relationship: one_to_one } join: salesforce_oppo { sql_on:${crm_account.name}=${salesforce_oppo.account_name};; relationship: one_to_many } }