version: 2
models:
  - name: INT_TIKTOK_ADS__CAMPAIGN_GLOBAL_PARTICIPANT_DBT
    description: Mapping between a Campaign and a Global Participant using a fuzzy campaign name vs. artist name matching.
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - CAMPAIGN_ID
              - GLOBAL_PARTICIPANT_ID
    columns:
      - name: CAMPAIGN_ID
        description: Facebook Ads Campaign ID
        tests:
          - not_null
      - name: GLOBAL_PARTICIPANT_ID
        description: Global Participant ID
        tests:
          - not_null
  - name: INT_TIKTOK_ADS__FIVETRAN_SCHEMA_ACCOUNT
    description: Mapping between a Tiktok Fivetran Schema name and a Vendor + Subaccount ID
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - FIVETRAN_SCHEMA
              - AD_ACCOUNT_ID
              - VENDOR_ID
              - SUBACCOUNT_ID
    columns:
      - name: FIVETRAN_SCHEMA
        description: Fivetran Schema
        tests:
          - not_null
      - name: AD_ACCOUNT_ID
        description: Tiktok Ad Account ID
        tests:
          - not_null
      - name: VENDOR_ID
        description: Vendor ID
        tests:
          - not_null
      - name: SUBACCOUNT_ID
        description: Subaccount ID
        tests:
          - not_null
      - name: VENDOR_NAME
        description: Vendor name
        tests:
          - not_null
      - name: BRAND_NAME
        description: Brand name of the Vendor
        tests:
          - not_null
  - name: INT_TIKTOK_ADS__AVAILABLE_SOURCE_SCHEMAS_DBT
    description: Names of Fivetran source schemas that have a minimal available set of tables to show them in Ad reporting
    columns:
      - name: SOURCE_SCHEMA
        description: Fivetran Schema
        tests:
          - not_null
          - unique
