
# Name your project! Project names should contain only lowercase characters
# and underscores. A good package name should reflect your organization's
# name or the intended use of these models
name: 'dbt_fivetran_marketing'
version: '1.0.0'
config-version: 2

# This setting configures which "profile" dbt uses for this project.
profile: 'dbt_fivetran_marketing'

# These configurations specify where dbt should look for different types of files.
# The `model-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
packages-install-path: "{{ env_var('DBT_PACKAGES_INSTALL_PATH', 'dbt_packages') }}"

clean-targets:         # directories to be removed by `dbt clean`
  - "target"
  - "dbt_packages"


# Configuring models
# Full documentation: https://docs.getdbt.com/docs/configuring-models

vars:
  ad_campaign_benchmark_window: '365 days'
  cortex_classification_model: 'mistral-large2'
  disallowed_link_clicks:
    - '%qa-preferences.theorchard.io%'
    - '%utm_source=fs_email_footer%'
    - '%fan-preferences.sonymusic.com%'

# In this example config, we tell dbt to build all models in the example/
# directory as views. These settings can be overridden in the individual model
# files using the `{{ config(...) }}` macro.
models:
  dbt_fivetran_marketing:
    +materialized: table
    facebook_ads:
      marts:
        +materialized: view
    google_ads:
      marts:
        +materialized: view
    internal_views:
      +materialized: view
      # For QA and PROD, this will create the views in a separate QA_MARKETING/PROD_MARKETING schema
      +schema: "{{ 'marketing' if target.schema.lower() in ['qa', 'prod'] else ''}}"
    external_views:
      +materialized: view
      # For QA and PROD, this will create the views in a separate QA_VIEWS/PROD_VIEWS schema
      +schema: "{{ 'views' if target.schema.lower() in ['qa', 'prod'] else ''}}"
    sendgrid:
      intermediate:
        +materialized: ephemeral
      marts:
        +materialized: table
