version: 2
models:
  - name: FACEBOOK_ADS__ACCOUNT_DBT
    description: The most recent Facebook Ads Ad Account data for a given source schema and Ad Account.
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - SOURCE_SCHEMA
              - ID
    columns:
      - name: SOURCE_SCHEMA
        description: Source Fivetran schema.
        tests:
          - not_null
      - name: ID
        description: Facebook Ads Ad Account ID
        tests:
          - not_null
      - name: NAME
        description: Ad Account Name
        tests:
          - not_null
      - name: BUSINESS_ACCOUNT_ID
        description: Business Manager Business ID
      - name: BUSINESS_ACCOUNT_NAME
        description: Business Manager Business Name
      - name: CAMPAIGNS_COUNT
        description: Number of Ad Campaigns of an Ad Account
        tests:
          - not_null
      - name: SYNCED_AT
        description: Timestamp of the last data sync by Fivetran
        tests:
          - not_null
  - name: FACEBOOK_ADS__CAMPAIGN_DBT
    description: |
      The most recent Facebook Ads Ad Campaign data for a given source schema and Ad Campaign.
      This table only includes campaigns we have performance data for.
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - SOURCE_SCHEMA
              - ID
    columns:
      - name: SOURCE_SCHEMA
        description: Source Fivetran schema.
        tests:
          - not_null
      - name: ID
        description: Campaign ID
        tests:
          - not_null
      - name: NAME
        description: Campaign Name
        tests:
          - not_null
      - name: ACCOUNT_ID
        description: Account ID
        tests:
          - not_null
      - name: GLOBAL_PARTICIPANT_ID
        description: |
          Global Participant ID matched using fuzzy string matching.
          Can be NULL.
      - name: START_AT
        description: Campaign Start datetime
        tests:
          - not_null
      - name: END_AT
        description: Campaign End datetime
        tests:
          - not_null
      - name: STATUS
        description: Campaign Status
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED']
      - name: EFFECTIVE_STATUS
        description: Campaign Effective Status
        tests:
          - not_null
      - name: OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: LIFETIME_BUDGET
        description: |
          Campaign Lifetime Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "LIFETIME_BUDGET > 0"
      - name: DAILY_BUDGET
        description: |
          Campaign Daily Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "DAILY_BUDGET > 0"
      - name: AD_SET_DAILY_BUDGET
        description: |
          Ad Set Daily Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET > 0"
      - name: AD_SET_LIFETIME_BUDGET
        description: |
          Ad Set Lifetime Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET > 0"
      - name: LIFETIME_BUDGET_USD
        description: Campaign Lifetime Budget in USD
        tests:
          - not_null:
              arguments:
                where: "LIFETIME_BUDGET is not null"
          - is_null:
              arguments:
                where: "LIFETIME_BUDGET is null"
      - name: DAILY_BUDGET_USD
        description: Campaign Daily Budget in USD
        tests:
          - not_null:
              arguments:
                where: "DAILY_BUDGET is not null"
          - is_null:
              arguments:
                where: "DAILY_BUDGET is null"
      - name: AD_SET_DAILY_BUDGET_USD
        description: Ad Set Daily Budget in USD
        tests:
          - not_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET is not null"
          - is_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET is null"
      - name: AD_SET_LIFETIME_BUDGET_USD
        description: Ad Set Lifetime Budget in USD
        tests:
          - not_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET is not null"
          - is_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET is null"
      - name: TARGETING_COUNTRIES
        description: Targeting Countries ISO-2 country codes
        tests:
          - not_null
      - name: PUBLISHER_PLATFORMS
        description: All unique Publishing platforms for Based on connected Ad Sets
        tests:
          - not_null
      - name: REPORTING_URL
        description: An external URL to Facebook Ads Reporting screen where a given Campaign is prefiltered.
        tests:
          - not_null
      - name: CURRENCY
        description: Currency code
        tests:
          - not_null
      - name: CLICKS
        description: Campaign Total Clicks
        tests:
          - not_null
      - name: IMPRESSIONS
        description: Campaign Impressions (the number of times the ad has been shown)
        tests:
          - not_null
      - name: REACH
        description: Campaign Reach (the number of unique users who have seen the ad)
        tests:
          - not_null
      - name: ESTIMATED_AD_RECALLERS
        description: |
          An estimate of the number of additional people who may remember seeing the ad, if asked, within 2 days
        tests:
          - not_null
      - name: VIEWS_P25
        description: The number of times a video was played at 25% of its length.
        tests:
          - not_null
      - name: VIEWS_THRUPLAY
        description: The number of times a video was played to completion or at least 15 seconds
        tests:
          - not_null
      - name: PURCHASES
        description: The number of purchases of an advertised item.
        tests:
          - not_null
      - name: POST_SHARES
        description: The number of post shares
        tests:
          - not_null
      - name: POST_REACTIONS
        description: The number of post reactions
        tests:
          - not_null
      - name: PAGE_LIKES
        description: The number of page likes
        tests:
          - not_null
      - name: POST_COMMENTS
        description: The number of post comments
        tests:
          - not_null
      - name: FREQUENCY
        description: Impressions / Reach
        tests:
          - not_null
      - name: SPEND
        description: |
          Campaign Total Spend at the moment (in the original monetary units specified by CURRENCY column, e.g. USD or EUR).
        tests:
          - not_null
      - name: SPEND_USD
        description: |
          Campaign Total Spend at the moment (in USD, converted using The Orchard exchange rate from FACTS.PROD.DIM_CURRENCY).
        tests:
          - not_null
      - name: COST_PER_ACTION
        description: Cost Per Action
        tests:
          - not_null
      - name: COST_PER_ACTION_USD
        description: Cost Per Action in USD
        tests:
          - not_null
      - name: COST_PER_IMPRESSION
        description: Cost Per Impression
        tests:
          - not_null
      - name: COST_PER_IMPRESSION_USD
        description: Cost Per Impression in USD
        tests:
          - not_null
      - name: ACTION_TYPE
        description: Action Type Name
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CLICKS', 'VIEWS', 'PURCHASES', 'EAR' ]
      - name: ACTIONS
        description: Actions value
        tests:
          - not_null
      - name: RATE_TYPE
        description: Rate Type
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CTR', 'VTR', 'CR', 'EARR' ]
      - name: RATE
        description: Rate Value
      - name: CTR
        description: Click Through Rate
      - name: SYNCED_AT
        description: A timestamp of the last ad performance data synced from Fivetran
        tests:
          - not_null
      - name: MIN_REPORT_DATE
        description: The earliest report date for this campaign
        tests:
          - not_null
      - name: MAX_REPORT_DATE
        description: The latest report date for this campaign
        tests:
          - not_null
  - name: FACEBOOK_ADS__CAMPAIGN_COUNTRY_DBT
    description: |
      The most recent Facebook Ads Ad Campaign data for a given source schema Ad Campaign and country.
      This table only includes campaigns we have performance data for.
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - SOURCE_SCHEMA
              - ID
              - COUNTRY_CODE
    columns:
      - name: SOURCE_SCHEMA
        description: Source Fivetran schema.
        tests:
          - not_null
      - name: ID
        description: Campaign ID
        tests:
          - not_null
      - name: COUNTRY_CODE
        description: Ad Country (ISO2 or UNKNOWN)
        tests:
          - not_null
      - name: NAME
        description: Campaign Name
        tests:
          - not_null
      - name: ACCOUNT_ID
        description: Account ID
        tests:
          - not_null
      - name: GLOBAL_PARTICIPANT_ID
        description: |
          Global Participant ID matched using fuzzy string matching.
          Can be NULL.
      - name: START_AT
        description: Campaign Start datetime
        tests:
          - not_null
      - name: END_AT
        description: Campaign End datetime
        tests:
          - not_null
      - name: STATUS
        description: Campaign Status
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED' ]
      - name: EFFECTIVE_STATUS
        description: Campaign Effective Status
        tests:
          - not_null
      - name: OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: LIFETIME_BUDGET
        description: |
          Campaign Lifetime Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "LIFETIME_BUDGET > 0"
      - name: DAILY_BUDGET
        description: |
          Campaign Daily Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "DAILY_BUDGET > 0"
      - name: AD_SET_DAILY_BUDGET
        description: |
          Ad Set Daily Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET > 0"
      - name: AD_SET_LIFETIME_BUDGET
        description: |
          Ad Set Lifetime Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET > 0"
      - name: LIFETIME_BUDGET_USD
        description: Campaign Lifetime Budget in USD
        tests:
          - not_null:
              arguments:
                where: "LIFETIME_BUDGET is not null"
          - is_null:
              arguments:
                where: "LIFETIME_BUDGET is null"
      - name: DAILY_BUDGET_USD
        description: Campaign Daily Budget in USD
        tests:
          - not_null:
              arguments:
                where: "DAILY_BUDGET is not null"
          - is_null:
              arguments:
                where: "DAILY_BUDGET is null"
      - name: AD_SET_DAILY_BUDGET_USD
        description: Ad Set Daily Budget in USD
        tests:
          - not_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET is not null"
          - is_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET is null"
      - name: AD_SET_LIFETIME_BUDGET_USD
        description: Ad Set Lifetime Budget in USD
        tests:
          - not_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET is not null"
          - is_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET is null"
      - name: TARGETING_COUNTRIES
        description: Targeting Countries ISO-2 country codes
        tests:
          - not_null
      - name: PUBLISHER_PLATFORMS
        description: All unique Publishing platforms for Based on connected Ad Sets
        tests:
          - not_null
      - name: REPORTING_URL
        description: An external URL to Facebook Ads Reporting screen where a given Campaign is prefiltered.
        tests:
          - not_null
      - name: CURRENCY
        description: Currency code
        tests:
          - not_null
      - name: CLICKS
        description: Campaign Total Clicks
        tests:
          - not_null
      - name: IMPRESSIONS
        description: Campaign Impressions (the number of times the ad has been shown)
        tests:
          - not_null
      - name: REACH
        description: Campaign Reach (the number of unique users who have seen the ad)
        tests:
          - not_null
      - name: ESTIMATED_AD_RECALLERS
        description: |
          An estimate of the number of additional people who may remember seeing the ad, if asked, within 2 days
        tests:
          - not_null
      - name: VIEWS_P25
        description: The number of times a video was played at 25% of its length.
        tests:
          - not_null
      - name: VIEWS_THRUPLAY
        description: The number of times a video was played to completion or at least 15 seconds
        tests:
          - not_null
      - name: PURCHASES
        description: The number of purchases of an advertised item.
        tests:
          - not_null
      - name: POST_SHARES
        description: The number of post shares
        tests:
          - not_null
      - name: POST_REACTIONS
        description: The number of post reactions
        tests:
          - not_null
      - name: PAGE_LIKES
        description: The number of page likes
        tests:
          - not_null
      - name: POST_COMMENTS
        description: The number of post comments
        tests:
          - not_null
      - name: FREQUENCY
        description: Impressions / Reach
        tests:
          - not_null
      - name: SPEND
        description: |
          Campaign Total Spend at the moment (in the original monetary units specified by CURRENCY column, e.g. USD or EUR).
        tests:
          - not_null
      - name: SPEND_USD
        description: |
          Campaign Total Spend at the moment (in USD, converted using The Orchard exchange rate from FACTS.PROD.DIM_CURRENCY).
        tests:
          - not_null
      - name: COST_PER_ACTION
        description: Cost Per Action
        tests:
          - not_null
      - name: COST_PER_ACTION_USD
        description: Cost Per Action in USD
        tests:
          - not_null
      - name: COST_PER_IMPRESSION
        description: Cost Per Impression
        tests:
          - not_null
      - name: COST_PER_IMPRESSION_USD
        description: Cost Per Impression in USD
        tests:
          - not_null
      - name: ACTION_TYPE
        description: Action Type Name
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CLICKS', 'VIEWS', 'PURCHASES', 'EAR' ]
      - name: ACTIONS
        description: Actions value
        tests:
          - not_null
      - name: RATE_TYPE
        description: Rate Type
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CTR', 'VTR', 'CR', 'EARR' ]
      - name: RATE
        description: Rate Value
      - name: CTR
        description: Click Through Rate
      - name: SYNCED_AT
        description: A timestamp of the last ad performance data synced from Fivetran
        tests:
          - not_null
      - name: MIN_REPORT_DATE
        description: The earliest report date for this campaign in this country
        tests:
          - not_null
      - name: MAX_REPORT_DATE
        description: The latest report date for this campaign in this country
        tests:
          - not_null
  - name: FACEBOOK_ADS__AD_SET_DBT
    description: |
      The most recent Ad Set data for a given source schema and Ad Set.
      This table only includes ad sets we have performance data for.
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - SOURCE_SCHEMA
              - ID
    columns:
      - name: SOURCE_SCHEMA
        description: Source Fivetran schema.
        tests:
          - not_null
      - name: ID
        description: Ad Set ID
        tests:
          - not_null
      - name: NAME
        description: Ad Set Name
        tests:
          - not_null
      - name: ACCOUNT_ID
        description: Account ID
        tests:
          - not_null
      - name: CAMPAIGN_ID
        description: Campaign ID
        tests:
          - not_null
      - name: CAMPAIGN_NAME
        description: Campaign name
      - name: CAMPAIGN_GLOBAL_PARTICIPANT_ID
        description: Campaign Global Participant ID
      - name: CAMPAIGN_OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: START_AT
        description: Ad Set Start datetime
        tests:
          - not_null
      - name: END_AT
        description: Ad Set End datetime
        tests:
          - not_null
      - name: EFFECTIVE_STATUS
        description: Ad Set Effective Status
        tests:
          - not_null
      - name: PUBLISHER_PLATFORMS
        description: All unique Publishing platforms for Based on connected Ad Sets
        tests:
          - not_null
      - name: DAILY_BUDGET
        description: Ad Set Daily Budget
        tests:
          - not_null:
              arguments:
                where: "DAILY_BUDGET > 0"
      - name: LIFETIME_BUDGET
        description: Ad Set Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "LIFETIME_BUDGET > 0"
      - name: CAMPAIGN_DAILY_BUDGET
        description: Campaign Daily Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET > 0"
      - name: CAMPAIGN_LIFETIME_BUDGET
        description: Campaign Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET > 0"
      - name: LIFETIME_BUDGET_USD
        description: Ad set Lifetime Budget in USD
        tests:
          - not_null:
              arguments:
                where: "LIFETIME_BUDGET is not null"
          - is_null:
              arguments:
                where: "LIFETIME_BUDGET is null"
      - name: DAILY_BUDGET_USD
        description: Ad set Daily Budget in USD
        tests:
          - not_null:
              arguments:
                where: "DAILY_BUDGET is not null"
          - is_null:
              arguments:
                where: "DAILY_BUDGET is null"
      - name: CAMPAIGN_DAILY_BUDGET_USD
        description: Campaign Daily Budget in USD
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET is not null"
          - is_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET is null"
      - name: CAMPAIGN_LIFETIME_BUDGET_USD
        description: Campaign Lifetime Budget in USD
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET is not null"
          - is_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET is null"
      - name: CURRENCY
        description: Currency code
        tests:
          - not_null
      - name: TARGETING_COUNTRIES
        description: Targeting Countries ISO-2 country codes
        tests:
          - not_null
      - name: REPORTING_URL
        description: An external URL to Facebook Ads Reporting screen where a given Ad Set is prefiltered.
        tests:
          - not_null
      - name: CLICKS
        description: Ad Set Total Clicks
        tests:
          - not_null
      - name: IMPRESSIONS
        description: Ad Set Impressions (the number of times the ad has been shown)
        tests:
          - not_null
      - name: REACH
        description: Ad Set Reach (the number of unique users who have seen the ad)
        tests:
          - not_null
      - name: ESTIMATED_AD_RECALLERS
        description: |
          An estimate of the number of additional people who may remember seeing the ad, if asked, within 2 days
        tests:
          - not_null
      - name: VIEWS_P25
        description: The number of times a video was played at 25% of its length.
        tests:
          - not_null
      - name: VIEWS_THRUPLAY
        description: The number of times a video was played to completion or at least 15 seconds
        tests:
          - not_null
      - name: PURCHASES
        description: The number of purchases of an advertised item.
        tests:
          - not_null
      - name: POST_SHARES
        description: The number of post shares
        tests:
          - not_null
      - name: POST_REACTIONS
        description: The number of post reactions
        tests:
          - not_null
      - name: PAGE_LIKES
        description: The number of page likes
        tests:
          - not_null
      - name: POST_COMMENTS
        description: The number of post comments
        tests:
          - not_null
      - name: FREQUENCY
        description: Impressions / Reach
        tests:
          - not_null
      - name: SPEND
        description: |
          Ad Set Total Spend at the moment (in the original monetary units specified by CURRENCY column, e.g. USD or EUR).
        tests:
          - not_null
      - name: SPEND_USD
        description: |
          Ad Set Total Spend at the moment (in USD, converted using The Orchard exchange rate from FACTS.PROD.DIM_CURRENCY).
        tests:
          - not_null
      - name: COST_PER_ACTION
        description: Cost Per Action
        tests:
          - not_null
      - name: COST_PER_ACTION_USD
        description: Cost Per Action in USD
        tests:
          - not_null
      - name: COST_PER_IMPRESSION
        description: Cost Per Impression
        tests:
          - not_null
      - name: COST_PER_IMPRESSION_USD
        description: Cost Per Impression in USD
        tests:
          - not_null
      - name: ACTION_TYPE
        description: Action Type Name
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CLICKS', 'VIEWS', 'PURCHASES', 'EAR' ]
      - name: ACTIONS
        description: Actions value
        tests:
          - not_null
      - name: RATE_TYPE
        description: Rate Type
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CTR', 'VTR', 'CR', 'EARR' ]
      - name: RATE
        description: Rate Value
      - name: CTR
        description: Click Through Rate
      - name: SYNCED_AT
        description: A timestamp of the last ad performance data synced from Fivetran
        tests:
          - not_null
  - name: FACEBOOK_ADS__AD_SET_COUNTRY_DBT
    description: |
      The most recent Ad Set data for a given source schema and Ad Set.
      This table only includes ad sets we have performance data for.
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - SOURCE_SCHEMA
              - ID
              - COUNTRY_CODE
    columns:
      - name: SOURCE_SCHEMA
        description: Source Fivetran schema.
        tests:
          - not_null
      - name: ID
        description: Ad Set ID
        tests:
          - not_null
      - name: COUNTRY_CODE
        description: Meta Ad Country (ISO2 or UNKNOWN)
        tests:
          - not_null
      - name: NAME
        description: Ad Set Name
        tests:
          - not_null
      - name: ACCOUNT_ID
        description: Account ID
        tests:
          - not_null
      - name: CAMPAIGN_ID
        description: Campaign ID
        tests:
          - not_null
      - name: CAMPAIGN_NAME
        description: Campaign name
      - name: CAMPAIGN_GLOBAL_PARTICIPANT_ID
        description: Campaign Global Participant ID
      - name: CAMPAIGN_OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: START_AT
        description: Ad Set Start datetime
        tests:
          - not_null
      - name: END_AT
        description: Ad Set End datetime
        tests:
          - not_null
      - name: EFFECTIVE_STATUS
        description: Ad Set Effective Status
        tests:
          - not_null
      - name: PUBLISHER_PLATFORMS
        description: All unique Publishing platforms for Based on connected Ad Sets
        tests:
          - not_null
      - name: DAILY_BUDGET
        description: Ad Set Daily Budget
        tests:
          - not_null:
              arguments:
                where: "DAILY_BUDGET > 0"
      - name: LIFETIME_BUDGET
        description: Ad Set Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "LIFETIME_BUDGET > 0"
      - name: CAMPAIGN_DAILY_BUDGET
        description: Campaign Daily Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET > 0"
      - name: CAMPAIGN_LIFETIME_BUDGET
        description: Campaign Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET > 0"
      - name: LIFETIME_BUDGET_USD
        description: Ad set Lifetime Budget in USD
        tests:
          - not_null:
              arguments:
                where: "LIFETIME_BUDGET is not null"
          - is_null:
              arguments:
                where: "LIFETIME_BUDGET is null"
      - name: DAILY_BUDGET_USD
        description: Ad set Daily Budget in USD
        tests:
          - not_null:
              arguments:
                where: "DAILY_BUDGET is not null"
          - is_null:
              arguments:
                where: "DAILY_BUDGET is null"
      - name: CAMPAIGN_DAILY_BUDGET_USD
        description: Campaign Daily Budget in USD
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET is not null"
          - is_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET is null"
      - name: CAMPAIGN_LIFETIME_BUDGET_USD
        description: Campaign Lifetime Budget in USD
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET is not null"
          - is_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET is null"
      - name: CURRENCY
        description: Currency code
        tests:
          - not_null
      - name: TARGETING_COUNTRIES
        description: Targeting Countries ISO-2 country codes
        tests:
          - not_null
      - name: REPORTING_URL
        description: An external URL to Facebook Ads Reporting screen where a given Ad Set is prefiltered.
        tests:
          - not_null
      - name: CLICKS
        description: Ad Set Total Clicks
        tests:
          - not_null
      - name: IMPRESSIONS
        description: Ad Set Impressions (the number of times the ad has been shown)
        tests:
          - not_null
      - name: REACH
        description: Ad Set Reach (the number of unique users who have seen the ad)
        tests:
          - not_null
      - name: ESTIMATED_AD_RECALLERS
        description: |
          An estimate of the number of additional people who may remember seeing the ad, if asked, within 2 days
        tests:
          - not_null
      - name: VIEWS_P25
        description: The number of times a video was played at 25% of its length.
        tests:
          - not_null
      - name: VIEWS_THRUPLAY
        description: The number of times a video was played to completion or at least 15 seconds
        tests:
          - not_null
      - name: PURCHASES
        description: The number of purchases of an advertised item.
        tests:
          - not_null
      - name: POST_SHARES
        description: The number of post shares
        tests:
          - not_null
      - name: POST_REACTIONS
        description: The number of post reactions
        tests:
          - not_null
      - name: PAGE_LIKES
        description: The number of page likes
        tests:
          - not_null
      - name: POST_COMMENTS
        description: The number of post comments
        tests:
          - not_null
      - name: FREQUENCY
        description: Impressions / Reach
        tests:
          - not_null
      - name: SPEND
        description: |
          Ad Set Total Spend at the moment (in the original monetary units specified by CURRENCY column, e.g. USD or EUR).
        tests:
          - not_null
      - name: SPEND_USD
        description: |
          Ad Set Total Spend at the moment (in USD, converted using The Orchard exchange rate from FACTS.PROD.DIM_CURRENCY).
        tests:
          - not_null
      - name: COST_PER_ACTION
        description: Cost Per Action
        tests:
          - not_null
      - name: COST_PER_ACTION_USD
        description: Cost Per Action in USD
        tests:
          - not_null
      - name: COST_PER_IMPRESSION
        description: Cost Per Impression
        tests:
          - not_null
      - name: COST_PER_IMPRESSION_USD
        description: Cost Per Impression in USD
        tests:
          - not_null
      - name: ACTION_TYPE
        description: Action Type Name
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CLICKS', 'VIEWS', 'PURCHASES', 'EAR' ]
      - name: ACTIONS
        description: Actions value
        tests:
          - not_null
      - name: RATE_TYPE
        description: Rate Type
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CTR', 'VTR', 'CR', 'EARR' ]
      - name: RATE
        description: Rate Value
      - name: CTR
        description: Click Through Rate
      - name: SYNCED_AT
        description: A timestamp of the last ad performance data synced from Fivetran
        tests:
          - not_null
      - name: MIN_REPORT_DATE
        description: The earliest report date for this ad set
        tests:
          - not_null
      - name: MAX_REPORT_DATE
        description: The latest report date for this ad set
        tests:
          - not_null
  - name: FACEBOOK_ADS__AD_DBT
    description: |
      The most recent Ad data for a given source schema and Ad.
      This table only includes ads we have performance data for.
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - SOURCE_SCHEMA
              - ID
    columns:
      - name: SOURCE_SCHEMA
        description: Source Fivetran schema.
        tests:
          - not_null
      - name: ID
        description: Ad ID
        tests:
          - not_null
      - name: NAME
        description: Ad Name
        tests:
          - not_null
      - name: EFFECTIVE_STATUS
        description: Ad Effective Status
        tests:
          - not_null
      - name: PUBLISHER_PLATFORMS
        description: All unique Publishing platforms for Based on connected Ad Sets
        tests:
          - not_null
      - name: AD_SET_DAILY_BUDGET
        description: Ad Set Daily Budget
        tests:
          - not_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET > 0"
      - name: AD_SET_LIFETIME_BUDGET
        description: Ad Set Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET > 0"
      - name: CAMPAIGN_DAILY_BUDGET
        description: Campaign Daily Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET > 0"
      - name: CAMPAIGN_LIFETIME_BUDGET
        description: Campaign Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET > 0"
      - name: AD_SET_LIFETIME_BUDGET_USD
        description: Ad set Lifetime Budget in USD
        tests:
          - not_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET is not null"
          - is_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET is null"
      - name: AD_SET_DAILY_BUDGET_USD
        description: Ad set Daily Budget in USD
        tests:
          - not_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET is not null"
          - is_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET is null"
      - name: CAMPAIGN_DAILY_BUDGET_USD
        description: Campaign Daily Budget in USD
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET is not null"
          - is_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET is null"
      - name: CAMPAIGN_LIFETIME_BUDGET_USD
        description: Campaign Lifetime Budget in USD
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET is not null"
          - is_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET is null"
      - name: CREATIVE_ID
        description: Creative ID
        tests:
          - not_null
      - name: CREATIVE_ORIGINAL_THUMBNAIL_URL
        description: Creative thumbnail URL from the platform CDN. Expires in a few days after being synced from Fivetran.
      - name: CREATIVE_IMAGE_URL
        description: Ad Creative original Ad Image URL. It is present when a Creative is an Image uploaded directly to Ads Manager.
      - name: CREATIVE_VIDEO_URL
        description: Ad Creative original Ad Video URL. It is present when a Creative is a Video uploaded directly to Ads Manager.
      - name: CREATIVE_POST_URL
        description: Instagram post URL. It is present when a Creative is a boosted Instagram post.
      - name: ACCOUNT_ID
        description: Account ID
        tests:
          - not_null
      - name: CAMPAIGN_ID
        description: Campaign ID
        tests:
          - not_null
      - name: CAMPAIGN_NAME
        description: Campaign name
      - name: CAMPAIGN_GLOBAL_PARTICIPANT_ID
        description: Campaign Global Participant ID
      - name: CAMPAIGN_OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: AD_SET_ID
        description: Ad Set ID
        tests:
          - not_null
      - name: AD_SET_NAME
        description: Ad Set name
        tests:
          - not_null
      - name: AD_SET_START_AT
        description: Ad Set Start At timestamp
        tests:
          - not_null
      - name: AD_SET_END_AT
        description: Ad Set End At timestamp
        tests:
          - not_null
      - name: TARGETING_COUNTRIES
        description: Targeting Countries ISO-2 country codes
        tests:
          - not_null
      - name: REPORTING_URL
        description: An external URL to Facebook Ads Reporting screen where a given Ad is prefiltered.
        tests:
          - not_null
      - name: CURRENCY
        description: Currency code
        tests:
          - not_null
      - name: CLICKS
        description: Ad Total Clicks
        tests:
          - not_null
      - name: IMPRESSIONS
        description: Ad Impressions (the number of times the ad has been shown)
        tests:
          - not_null
      - name: REACH
        description: Ad Reach (the number of unique users who have seen the ad)
        tests:
          - not_null
      - name: ESTIMATED_AD_RECALLERS
        description: |
          An estimate of the number of additional people who may remember seeing the ad, if asked, within 2 days
        tests:
          - not_null
      - name: VIEWS_P25
        description: The number of times a video was played at 25% of its length.
        tests:
          - not_null
      - name: VIEWS_THRUPLAY
        description: The number of times a video was played to completion or at least 15 seconds
        tests:
          - not_null
      - name: PURCHASES
        description: The number of purchases of an advertised item.
        tests:
          - not_null
      - name: POST_SHARES
        description: The number of post shares
        tests:
          - not_null
      - name: POST_REACTIONS
        description: The number of post reactions
        tests:
          - not_null
      - name: PAGE_LIKES
        description: The number of page likes
        tests:
          - not_null
      - name: POST_COMMENTS
        description: The number of post comments
        tests:
          - not_null
      - name: FREQUENCY
        description: Impressions / Reach
        tests:
          - not_null
      - name: SPEND
        description: |
          Ad Total Spend at the moment (in the original monetary units specified by CURRENCY column, e.g. USD or EUR).
        tests:
          - not_null
      - name: SPEND_USD
        description: |
          Ad Total Spend at the moment (in USD, converted using The Orchard exchange rate from FACTS.PROD.DIM_CURRENCY).
        tests:
          - not_null
      - name: COST_PER_ACTION
        description: Cost Per Action
        tests:
          - not_null
      - name: COST_PER_ACTION_USD
        description: Cost Per Action in USD
        tests:
          - not_null
      - name: COST_PER_IMPRESSION
        description: Cost Per Impression
        tests:
          - not_null
      - name: COST_PER_IMPRESSION_USD
        description: Cost Per Impression in USD
        tests:
          - not_null
      - name: ACTION_TYPE
        description: Action Type Name
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CLICKS', 'VIEWS', 'PURCHASES', 'EAR' ]
      - name: ACTIONS
        description: Actions value
        tests:
          - not_null
      - name: RATE_TYPE
        description: Rate Type
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: ['CTR', 'VTR', 'CR', 'EARR']
      - name: RATE
        description: Rate Value
      - name: CTR
        description: Click Through Rate
      - name: SYNCED_AT
        description: A timestamp of the last ad performance data synced from Fivetran
        tests:
          - not_null
      - name: MIN_REPORT_DATE
        description: The earliest report date for this ad set in this country
        tests:
          - not_null
      - name: MAX_REPORT_DATE
        description: The latest report date for this ad set in this country
        tests:
          - not_null
  - name: FACEBOOK_ADS__AD_COUNTRY_DBT
    description: |
      The most recent Ad data for a given source schema and Ad.
      This table only includes ads we have performance data for.
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - SOURCE_SCHEMA
              - ID
              - COUNTRY_CODE
    columns:
      - name: SOURCE_SCHEMA
        description: Source Fivetran schema.
        tests:
          - not_null
      - name: ID
        description: Ad ID
        tests:
          - not_null
      - name: COUNTRY_CODE
        description: Meta Ad Country (ISO2 or UNKNOWN)
        tests:
          - not_null
      - name: NAME
        description: Ad Name
        tests:
          - not_null
      - name: EFFECTIVE_STATUS
        description: Ad Effective Status
        tests:
          - not_null
      - name: PUBLISHER_PLATFORMS
        description: All unique Publishing platforms for Based on connected Ad Sets
        tests:
          - not_null
      - name: AD_SET_DAILY_BUDGET
        description: Ad Set Daily Budget
        tests:
          - not_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET > 0"
      - name: AD_SET_LIFETIME_BUDGET
        description: Ad Set Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET > 0"
      - name: CAMPAIGN_DAILY_BUDGET
        description: Campaign Daily Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET > 0"
      - name: CAMPAIGN_LIFETIME_BUDGET
        description: Campaign Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET > 0"
      - name: AD_SET_LIFETIME_BUDGET_USD
        description: Ad set Lifetime Budget in USD
        tests:
          - not_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET is not null"
          - is_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET is null"
      - name: AD_SET_DAILY_BUDGET_USD
        description: Ad set Daily Budget in USD
        tests:
          - not_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET is not null"
          - is_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET is null"
      - name: CAMPAIGN_DAILY_BUDGET_USD
        description: Campaign Daily Budget in USD
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET is not null"
          - is_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET is null"
      - name: CAMPAIGN_LIFETIME_BUDGET_USD
        description: Campaign Lifetime Budget in USD
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET is not null"
          - is_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET is null"
      - name: CREATIVE_ID
        description: Creative ID
        tests:
          - not_null
      - name: CREATIVE_ORIGINAL_THUMBNAIL_URL
        description: Creative thumbnail URL from the platform CDN. Expires in a few days after being synced from Fivetran.
      - name: CREATIVE_IMAGE_URL
        description: Ad Creative original Ad Image URL. It is present when a Creative is an Image uploaded directly to Ads Manager.
      - name: CREATIVE_VIDEO_URL
        description: Ad Creative original Ad Video URL. It is present when a Creative is a Video uploaded directly to Ads Manager.
      - name: CREATIVE_POST_URL
        description: Instagram post URL. It is present when a Creative is a boosted Instagram post.
      - name: ACCOUNT_ID
        description: Account ID
        tests:
          - not_null
      - name: CAMPAIGN_ID
        description: Campaign ID
        tests:
          - not_null
      - name: CAMPAIGN_NAME
        description: Campaign name
      - name: CAMPAIGN_GLOBAL_PARTICIPANT_ID
        description: Campaign Global Participant ID
      - name: CAMPAIGN_OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: AD_SET_ID
        description: Ad Set ID
        tests:
          - not_null
      - name: AD_SET_NAME
        description: Ad Set name
        tests:
          - not_null
      - name: AD_SET_START_AT
        description: Ad Set Start At timestamp
        tests:
          - not_null
      - name: AD_SET_END_AT
        description: Ad Set End At timestamp
        tests:
          - not_null
      - name: TARGETING_COUNTRIES
        description: Targeting Countries ISO-2 country codes
        tests:
          - not_null
      - name: REPORTING_URL
        description: An external URL to Facebook Ads Reporting screen where a given Ad is prefiltered.
        tests:
          - not_null
      - name: CURRENCY
        description: Currency code
        tests:
          - not_null
      - name: CLICKS
        description: Ad Total Clicks
        tests:
          - not_null
      - name: IMPRESSIONS
        description: Ad Impressions (the number of times the ad has been shown)
        tests:
          - not_null
      - name: REACH
        description: Ad Reach (the number of unique users who have seen the ad)
        tests:
          - not_null
      - name: ESTIMATED_AD_RECALLERS
        description: |
          An estimate of the number of additional people who may remember seeing the ad, if asked, within 2 days
        tests:
          - not_null
      - name: VIEWS_P25
        description: The number of times a video was played at 25% of its length.
        tests:
          - not_null
      - name: VIEWS_THRUPLAY
        description: The number of times a video was played to completion or at least 15 seconds
        tests:
          - not_null
      - name: PURCHASES
        description: The number of purchases of an advertised item.
        tests:
          - not_null
      - name: FREQUENCY
        description: Impressions / Reach
        tests:
          - not_null
      - name: SPEND
        description: |
          Ad Total Spend at the moment (in the original monetary units specified by CURRENCY column, e.g. USD or EUR).
        tests:
          - not_null
      - name: SPEND_USD
        description: |
          Ad Total Spend at the moment (in USD, converted using The Orchard exchange rate from FACTS.PROD.DIM_CURRENCY).
        tests:
          - not_null
      - name: COST_PER_ACTION
        description: Cost Per Action
        tests:
          - not_null
      - name: COST_PER_ACTION_USD
        description: Cost Per Action in USD
        tests:
          - not_null
      - name: COST_PER_IMPRESSION
        description: Cost Per Impression
        tests:
          - not_null
      - name: COST_PER_IMPRESSION_USD
        description: Cost Per Impression in USD
        tests:
          - not_null
      - name: ACTION_TYPE
        description: Action Type Name
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CLICKS', 'VIEWS', 'PURCHASES', 'EAR' ]
      - name: ACTIONS
        description: Actions value
        tests:
          - not_null
      - name: RATE_TYPE
        description: Rate Type
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: ['CTR', 'VTR', 'CR', 'EARR']
      - name: RATE
        description: Rate Value
      - name: CTR
        description: Click Through Rate
      - name: SYNCED_AT
        description: A timestamp of the last ad performance data synced from Fivetran
        tests:
          - not_null
      - name: MIN_REPORT_DATE
        description: The earliest report date for this ad
        tests:
          - not_null
      - name: MAX_REPORT_DATE
        description: The latest report date for this ad
        tests:
          - not_null
  - name: FACEBOOK_ADS__CAMPAIGN_DATE_DBT
    description: |
      Facebook Ads Ad Campaign performance data aggregated by date.
      This table includes daily performance metrics for campaigns we have data for.
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - SOURCE_SCHEMA
              - ID
              - REPORT_DATE
              - ACTION_TYPE
    columns:
      - name: SOURCE_SCHEMA
        description: Source Fivetran schema.
        tests:
          - not_null
      - name: ID
        description: Campaign ID
        tests:
          - not_null
      - name: REPORT_DATE
        description: Date of the performance report
        tests:
          - not_null
      - name: NAME
        description: Campaign Name
        tests:
          - not_null
      - name: ACCOUNT_ID
        description: Account ID
        tests:
          - not_null
      - name: GLOBAL_PARTICIPANT_ID
        description: |
          Global Participant ID matched using fuzzy string matching.
          Can be NULL.
      - name: START_AT
        description: Campaign Start datetime
        tests:
          - not_null
      - name: END_AT
        description: Campaign End datetime
        tests:
          - not_null
      - name: STATUS
        description: Campaign Status
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED']
      - name: EFFECTIVE_STATUS
        description: Campaign Effective Status
        tests:
          - not_null
      - name: OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: AD_SET_DAILY_BUDGET
        description: |
          Ad Set Daily Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET > 0"
      - name: AD_SET_LIFETIME_BUDGET
        description: |
          Ad Set Lifetime Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET > 0"
      - name: DAILY_BUDGET
        description: |
          Campaign Daily Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "DAILY_BUDGET > 0"
      - name: LIFETIME_BUDGET
        description: |
          Campaign Lifetime Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "LIFETIME_BUDGET > 0"
      - name: TARGETING_COUNTRIES
        description: Targeting Countries ISO-2 country codes
        tests:
          - not_null
      - name: REPORTING_URL
        description: An external URL to Facebook Ads Reporting screen where a given Campaign is prefiltered.
        tests:
          - not_null
      - name: CURRENCY
        description: Currency code
        tests:
          - not_null
      - name: CLICKS
        description: Campaign Total Clicks for the date
        tests:
          - not_null
      - name: IMPRESSIONS
        description: Campaign Impressions (the number of times the ad has been shown) for the date
        tests:
          - not_null
      - name: REACH
        description: Campaign Reach (the number of unique users who have seen the ad) for the date
        tests:
          - not_null
      - name: ESTIMATED_AD_RECALLERS
        description: |
          An estimate of the number of additional people who may remember seeing the ad, if asked, within 2 days
        tests:
          - not_null
      - name: VIEWS_P25
        description: The number of times a video was played at 25% of its length.
        tests:
          - not_null
      - name: VIEWS_THRUPLAY
        description: The number of times a video was played to completion or at least 15 seconds
        tests:
          - not_null
      - name: PURCHASES
        description: The number of purchases of an advertised item.
        tests:
          - not_null
      - name: FREQUENCY
        description: Impressions / Reach
        tests:
          - not_null
      - name: SPEND
        description: |
          Campaign Spend for the date (in the original monetary units specified by CURRENCY column, e.g. USD or EUR).
        tests:
          - not_null
      - name: SPEND_USD
        description: |
          Campaign Spend for the date (in USD, converted using The Orchard exchange rate from FACTS.PROD.DIM_CURRENCY).
        tests:
          - not_null
      - name: COST_PER_ACTION
        description: Cost Per Action
        tests:
          - not_null
      - name: COST_PER_ACTION_USD
        description: Cost Per Action in USD
        tests:
          - not_null
      - name: COST_PER_IMPRESSION
        description: Cost Per Impression
        tests:
          - not_null
      - name: COST_PER_IMPRESSION_USD
        description: Cost Per Impression in USD
        tests:
          - not_null
      - name: ACTION_TYPE
        description: Action Type Name
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CLICKS', 'VIEWS', 'PURCHASES', 'EAR' ]
      - name: ACTIONS
        description: Actions value
        tests:
          - not_null
      - name: RATE_TYPE
        description: Rate Type
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CTR', 'VTR', 'CR', 'EARR' ]
      - name: RATE
        description: Rate Value
      - name: CTR
        description: Click Through Rate
      - name: SYNCED_AT
        description: A timestamp of the last ad performance data synced from Fivetran
        tests:
          - not_null
  - name: FACEBOOK_ADS__CAMPAIGN_COUNTRY_DATE_DBT
    description: |
      Facebook Ads Ad Campaign performance data aggregated by date and country.
      This table includes daily performance metrics broken down by country for campaigns we have data for.
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - SOURCE_SCHEMA
              - ID
              - COUNTRY_CODE
              - REPORT_DATE
              - ACTION_TYPE
    columns:
      - name: SOURCE_SCHEMA
        description: Source Fivetran schema.
        tests:
          - not_null
      - name: ID
        description: Campaign ID
        tests:
          - not_null
      - name: COUNTRY_CODE
        description: Ad Country (ISO2 or UNKNOWN)
        tests:
          - not_null
      - name: REPORT_DATE
        description: Date of the performance report
        tests:
          - not_null
      - name: NAME
        description: Campaign Name
        tests:
          - not_null
      - name: ACCOUNT_ID
        description: Account ID
        tests:
          - not_null
      - name: GLOBAL_PARTICIPANT_ID
        description: |
          Global Participant ID matched using fuzzy string matching.
          Can be NULL.
      - name: START_AT
        description: Campaign Start datetime
        tests:
          - not_null
      - name: END_AT
        description: Campaign End datetime
        tests:
          - not_null
      - name: STATUS
        description: Campaign Status
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'ACTIVE', 'PAUSED', 'DELETED', 'ARCHIVED' ]
      - name: EFFECTIVE_STATUS
        description: Campaign Effective Status
        tests:
          - not_null
      - name: OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: AD_SET_DAILY_BUDGET
        description: |
          Ad Set Daily Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET > 0"
      - name: AD_SET_LIFETIME_BUDGET
        description: |
          Ad Set Lifetime Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET > 0"
      - name: DAILY_BUDGET
        description: |
          Campaign Daily Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "DAILY_BUDGET > 0"
      - name: LIFETIME_BUDGET
        description: |
          Campaign Lifetime Budget (in fractional monetary units - cents, e.g. US cents).
          Can be NULL.
        tests:
          - not_null:
              arguments:
                where: "LIFETIME_BUDGET > 0"
      - name: TARGETING_COUNTRIES
        description: Targeting Countries ISO-2 country codes
        tests:
          - not_null
      - name: REPORTING_URL
        description: An external URL to Facebook Ads Reporting screen where a given Campaign is prefiltered.
        tests:
          - not_null
      - name: CURRENCY
        description: Currency code
        tests:
          - not_null
      - name: CLICKS
        description: Campaign Total Clicks for the date and country
        tests:
          - not_null
      - name: IMPRESSIONS
        description: Campaign Impressions for the date and country
        tests:
          - not_null
      - name: REACH
        description: Campaign Reach for the date and country
        tests:
          - not_null
      - name: ESTIMATED_AD_RECALLERS
        description: |
          An estimate of the number of additional people who may remember seeing the ad, if asked, within 2 days
        tests:
          - not_null
      - name: VIEWS_P25
        description: The number of times a video was played at 25% of its length.
        tests:
          - not_null
      - name: VIEWS_THRUPLAY
        description: The number of times a video was played to completion or at least 15 seconds
        tests:
          - not_null
      - name: PURCHASES
        description: The number of purchases of an advertised item.
        tests:
          - not_null
      - name: FREQUENCY
        description: Impressions / Reach
        tests:
          - not_null
      - name: SPEND
        description: |
          Campaign Spend for the date and country (in the original monetary units specified by CURRENCY column, e.g. USD or EUR).
        tests:
          - not_null
      - name: SPEND_USD
        description: |
          Campaign Spend for the date and country (in USD, converted using The Orchard exchange rate from FACTS.PROD.DIM_CURRENCY).
        tests:
          - not_null
      - name: COST_PER_ACTION
        description: Cost Per Action
        tests:
          - not_null
      - name: COST_PER_ACTION_USD
        description: Cost Per Action in USD
        tests:
          - not_null
      - name: COST_PER_IMPRESSION
        description: Cost Per Impression
        tests:
          - not_null
      - name: COST_PER_IMPRESSION_USD
        description: Cost Per Impression in USD
        tests:
          - not_null
      - name: ACTION_TYPE
        description: Action Type Name
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CLICKS', 'VIEWS', 'PURCHASES', 'EAR' ]
      - name: ACTIONS
        description: Actions value
        tests:
          - not_null
      - name: RATE_TYPE
        description: Rate Type
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CTR', 'VTR', 'CR', 'EARR' ]
      - name: RATE
        description: Rate Value
      - name: CTR
        description: Click Through Rate
      - name: SYNCED_AT
        description: A timestamp of the last ad performance data synced from Fivetran
        tests:
          - not_null
  - name: FACEBOOK_ADS__AD_SET_DATE_DBT
    description: |
      Facebook Ads Ad Set performance data aggregated by date.
      This table includes daily performance metrics for ad sets we have data for.
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - SOURCE_SCHEMA
              - ID
              - REPORT_DATE
              - ACTION_TYPE
    columns:
      - name: SOURCE_SCHEMA
        description: Source Fivetran schema.
        tests:
          - not_null
      - name: ID
        description: Ad Set ID
        tests:
          - not_null
      - name: REPORT_DATE
        description: Date of the performance report
        tests:
          - not_null
      - name: NAME
        description: Ad Set Name
        tests:
          - not_null
      - name: ACCOUNT_ID
        description: Account ID
        tests:
          - not_null
      - name: CAMPAIGN_ID
        description: Campaign ID
        tests:
          - not_null
      - name: CAMPAIGN_NAME
        description: Campaign name
      - name: CAMPAIGN_GLOBAL_PARTICIPANT_ID
        description: Campaign Global Participant ID
      - name: OBJECTIVE
        description: Ad Set Objective
        tests:
          - not_null
      - name: CAMPAIGN_OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: START_AT
        description: Ad Set Start datetime
        tests:
          - not_null
      - name: END_AT
        description: Ad Set End datetime
        tests:
          - not_null
      - name: STATUS
        description: Ad Set Status
        tests:
          - not_null
      - name: EFFECTIVE_STATUS
        description: Ad Set Effective Status
        tests:
          - not_null
      - name: DAILY_BUDGET
        description: Ad Set Daily Budget
        tests:
          - not_null:
              arguments:
                where: "DAILY_BUDGET > 0"
      - name: LIFETIME_BUDGET
        description: Ad Set Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "LIFETIME_BUDGET > 0"
      - name: CAMPAIGN_DAILY_BUDGET
        description: Campaign Daily Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET > 0"
      - name: CAMPAIGN_LIFETIME_BUDGET
        description: Campaign Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET > 0"
      - name: TARGETING_COUNTRIES
        description: Targeting Countries ISO-2 country codes
        tests:
          - not_null
      - name: REPORTING_URL
        description: An external URL to Facebook Ads Reporting screen where a given Ad Set is prefiltered.
        tests:
          - not_null
      - name: CURRENCY
        description: Currency code
        tests:
          - not_null
      - name: CLICKS
        description: Ad Set Total Clicks for the date
        tests:
          - not_null
      - name: IMPRESSIONS
        description: Ad Set Impressions for the date
        tests:
          - not_null
      - name: REACH
        description: Ad Set Reach for the date
        tests:
          - not_null
      - name: ESTIMATED_AD_RECALLERS
        description: |
          An estimate of the number of additional people who may remember seeing the ad, if asked, within 2 days
        tests:
          - not_null
      - name: VIEWS_P25
        description: The number of times a video was played at 25% of its length.
        tests:
          - not_null
      - name: VIEWS_THRUPLAY
        description: The number of times a video was played to completion or at least 15 seconds
        tests:
          - not_null
      - name: PURCHASES
        description: The number of purchases of an advertised item.
        tests:
          - not_null
      - name: FREQUENCY
        description: Impressions / Reach
        tests:
          - not_null
      - name: SPEND
        description: |
          Ad Set Spend for the date (in the original monetary units specified by CURRENCY column, e.g. USD or EUR).
        tests:
          - not_null
      - name: SPEND_USD
        description: |
          Ad Set Spend for the date (in USD, converted using The Orchard exchange rate from FACTS.PROD.DIM_CURRENCY).
        tests:
          - not_null
      - name: COST_PER_ACTION
        description: Cost Per Action
        tests:
          - not_null
      - name: COST_PER_ACTION_USD
        description: Cost Per Action in USD
        tests:
          - not_null
      - name: COST_PER_IMPRESSION
        description: Cost Per Impression
        tests:
          - not_null
      - name: COST_PER_IMPRESSION_USD
        description: Cost Per Impression in USD
        tests:
          - not_null
      - name: ACTION_TYPE
        description: Action Type Name
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CLICKS', 'VIEWS', 'PURCHASES', 'EAR' ]
      - name: ACTIONS
        description: Actions value
        tests:
          - not_null
      - name: RATE_TYPE
        description: Rate Type
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CTR', 'VTR', 'CR', 'EARR' ]
      - name: RATE
        description: Rate Value
      - name: CTR
        description: Click Through Rate
      - name: SYNCED_AT
        description: A timestamp of the last ad performance data synced from Fivetran
        tests:
          - not_null
  - name: FACEBOOK_ADS__AD_SET_COUNTRY_DATE_DBT
    description: |
      Facebook Ads Ad Set performance data aggregated by date and country.
      This table includes daily performance metrics broken down by country for ad sets we have data for.
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - SOURCE_SCHEMA
              - ID
              - COUNTRY_CODE
              - REPORT_DATE
              - ACTION_TYPE
    columns:
      - name: SOURCE_SCHEMA
        description: Source Fivetran schema.
        tests:
          - not_null
      - name: ID
        description: Ad Set ID
        tests:
          - not_null
      - name: COUNTRY_CODE
        description: Ad Country (ISO2 or UNKNOWN)
        tests:
          - not_null
      - name: REPORT_DATE
        description: Date of the performance report
        tests:
          - not_null
      - name: NAME
        description: Ad Set Name
        tests:
          - not_null
      - name: ACCOUNT_ID
        description: Account ID
        tests:
          - not_null
      - name: CAMPAIGN_ID
        description: Campaign ID
        tests:
          - not_null
      - name: CAMPAIGN_NAME
        description: Campaign name
      - name: CAMPAIGN_GLOBAL_PARTICIPANT_ID
        description: Campaign Global Participant ID
      - name: OBJECTIVE
        description: Ad Set Objective
        tests:
          - not_null
      - name: CAMPAIGN_OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: START_AT
        description: Ad Set Start datetime
        tests:
          - not_null
      - name: END_AT
        description: Ad Set End datetime
        tests:
          - not_null
      - name: STATUS
        description: Ad Set Status
        tests:
          - not_null
      - name: EFFECTIVE_STATUS
        description: Ad Set Effective Status
        tests:
          - not_null
      - name: DAILY_BUDGET
        description: Ad Set Daily Budget
        tests:
          - not_null:
              arguments:
                where: "DAILY_BUDGET > 0"
      - name: LIFETIME_BUDGET
        description: Ad Set Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "LIFETIME_BUDGET > 0"
      - name: CAMPAIGN_DAILY_BUDGET
        description: Campaign Daily Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET > 0"
      - name: CAMPAIGN_LIFETIME_BUDGET
        description: Campaign Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET > 0"
      - name: TARGETING_COUNTRIES
        description: Targeting Countries ISO-2 country codes
        tests:
          - not_null
      - name: REPORTING_URL
        description: An external URL to Facebook Ads Reporting screen where a given Ad Set is prefiltered.
        tests:
          - not_null
      - name: CURRENCY
        description: Currency code
        tests:
          - not_null
      - name: CLICKS
        description: Ad Set Total Clicks for the date and country
        tests:
          - not_null
      - name: IMPRESSIONS
        description: Ad Set Impressions for the date and country
        tests:
          - not_null
      - name: REACH
        description: Ad Set Reach for the date and country
        tests:
          - not_null
      - name: ESTIMATED_AD_RECALLERS
        description: |
          An estimate of the number of additional people who may remember seeing the ad, if asked, within 2 days
        tests:
          - not_null
      - name: VIEWS_P25
        description: The number of times a video was played at 25% of its length.
        tests:
          - not_null
      - name: VIEWS_THRUPLAY
        description: The number of times a video was played to completion or at least 15 seconds
        tests:
          - not_null
      - name: PURCHASES
        description: The number of purchases of an advertised item.
        tests:
          - not_null
      - name: FREQUENCY
        description: Impressions / Reach
        tests:
          - not_null
      - name: SPEND
        description: |
          Ad Set Spend for the date and country (in the original monetary units specified by CURRENCY column, e.g. USD or EUR).
        tests:
          - not_null
      - name: SPEND_USD
        description: |
          Ad Set Spend for the date and country (in USD, converted using The Orchard exchange rate from FACTS.PROD.DIM_CURRENCY).
        tests:
          - not_null
      - name: COST_PER_ACTION
        description: Cost Per Action
        tests:
          - not_null
      - name: COST_PER_ACTION_USD
        description: Cost Per Action in USD
        tests:
          - not_null
      - name: COST_PER_IMPRESSION
        description: Cost Per Impression
        tests:
          - not_null
      - name: COST_PER_IMPRESSION_USD
        description: Cost Per Impression in USD
        tests:
          - not_null
      - name: ACTION_TYPE
        description: Action Type Name
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CLICKS', 'VIEWS', 'PURCHASES', 'EAR' ]
      - name: ACTIONS
        description: Actions value
        tests:
          - not_null
      - name: RATE_TYPE
        description: Rate Type
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CTR', 'VTR', 'CR', 'EARR' ]
      - name: RATE
        description: Rate Value
      - name: CTR
        description: Click Through Rate
      - name: SYNCED_AT
        description: A timestamp of the last ad performance data synced from Fivetran
        tests:
          - not_null
  - name: FACEBOOK_ADS__AD_DATE_DBT
    description: |
      Facebook Ads Ad performance data aggregated by date.
      This table includes daily performance metrics for ads we have data for.
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - SOURCE_SCHEMA
              - ID
              - REPORT_DATE
              - ACTION_TYPE
    columns:
      - name: SOURCE_SCHEMA
        description: Source Fivetran schema.
        tests:
          - not_null
      - name: ID
        description: Ad ID
        tests:
          - not_null
      - name: REPORT_DATE
        description: Date of the performance report
        tests:
          - not_null
      - name: NAME
        description: Ad Name
        tests:
          - not_null
      - name: STATUS
        description: Ad Status
        tests:
          - not_null
      - name: EFFECTIVE_STATUS
        description: Ad Effective Status
        tests:
          - not_null
      - name: AD_SET_DAILY_BUDGET
        description: Ad Set Daily Budget
        tests:
          - not_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET > 0"
      - name: AD_SET_LIFETIME_BUDGET
        description: Ad Set Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET > 0"
      - name: CAMPAIGN_DAILY_BUDGET
        description: Campaign Daily Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET > 0"
      - name: CAMPAIGN_LIFETIME_BUDGET
        description: Campaign Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET > 0"
      - name: CREATIVE_ID
        description: Creative ID
        tests:
          - not_null
      - name: CREATIVE_ORIGINAL_THUMBNAIL_URL
        description: Creative thumbnail URL from the platform CDN. Expires in a few days after being synced from Fivetran.
      - name: CREATIVE_IMAGE_URL
        description: Ad Creative original Ad Image URL. It is present when a Creative is an Image uploaded directly to Ads Manager.
      - name: CREATIVE_VIDEO_URL
        description: Ad Creative original Ad Video URL. It is present when a Creative is a Video uploaded directly to Ads Manager.
      - name: CREATIVE_POST_URL
        description: Instagram post URL. It is present when a Creative is a boosted Instagram post.
      - name: ACCOUNT_ID
        description: Account ID
        tests:
          - not_null
      - name: CAMPAIGN_ID
        description: Campaign ID
        tests:
          - not_null
      - name: CAMPAIGN_NAME
        description: Campaign name
      - name: CAMPAIGN_GLOBAL_PARTICIPANT_ID
        description: Campaign Global Participant ID
      - name: OBJECTIVE
        description: Ad Objective
        tests:
          - not_null
      - name: CAMPAIGN_OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: REPORTING_URL
        description: An external URL to Facebook Ads Reporting screen where a given Ad is prefiltered.
        tests:
          - not_null
      - name: AD_SET_ID
        description: Ad Set ID
        tests:
          - not_null
      - name: AD_SET_NAME
        description: Ad Set name
        tests:
          - not_null
      - name: AD_SET_START_AT
        description: Ad Set Start At timestamp
        tests:
          - not_null
      - name: AD_SET_END_AT
        description: Ad Set End At timestamp
        tests:
          - not_null
      - name: TARGETING_COUNTRIES
        description: Targeting Countries ISO-2 country codes
        tests:
          - not_null
      - name: CURRENCY
        description: Currency code
        tests:
          - not_null
      - name: CLICKS
        description: Ad Total Clicks for the date
        tests:
          - not_null
      - name: IMPRESSIONS
        description: Ad Impressions for the date
        tests:
          - not_null
      - name: REACH
        description: Ad Reach for the date
        tests:
          - not_null
      - name: ESTIMATED_AD_RECALLERS
        description: |
          An estimate of the number of additional people who may remember seeing the ad, if asked, within 2 days
        tests:
          - not_null
      - name: VIEWS_P25
        description: The number of times a video was played at 25% of its length.
        tests:
          - not_null
      - name: VIEWS_THRUPLAY
        description: The number of times a video was played to completion or at least 15 seconds
        tests:
          - not_null
      - name: PURCHASES
        description: The number of purchases of an advertised item.
        tests:
          - not_null
      - name: FREQUENCY
        description: Impressions / Reach
        tests:
          - not_null
      - name: SPEND
        description: |
          Ad Spend for the date (in the original monetary units specified by CURRENCY column, e.g. USD or EUR).
        tests:
          - not_null
      - name: SPEND_USD
        description: |
          Ad Spend for the date (in USD, converted using The Orchard exchange rate from FACTS.PROD.DIM_CURRENCY).
        tests:
          - not_null
      - name: COST_PER_ACTION
        description: Cost Per Action
        tests:
          - not_null
      - name: COST_PER_ACTION_USD
        description: Cost Per Action in USD
        tests:
          - not_null
      - name: COST_PER_IMPRESSION
        description: Cost Per Impression
        tests:
          - not_null
      - name: COST_PER_IMPRESSION_USD
        description: Cost Per Impression in USD
        tests:
          - not_null
      - name: ACTION_TYPE
        description: Action Type Name
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CLICKS', 'VIEWS', 'PURCHASES', 'EAR' ]
      - name: ACTIONS
        description: Actions value
        tests:
          - not_null
      - name: RATE_TYPE
        description: Rate Type
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: ['CTR', 'VTR', 'CR', 'EARR']
      - name: RATE
        description: Rate Value
      - name: CTR
        description: Click Through Rate
      - name: SYNCED_AT
        description: A timestamp of the last ad performance data synced from Fivetran
        tests:
          - not_null
  - name: FACEBOOK_ADS__AD_COUNTRY_DATE_DBT
    description: |
      Facebook Ads Ad performance data aggregated by date and country.
      This table includes daily performance metrics broken down by country for ads we have data for.
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - SOURCE_SCHEMA
              - ID
              - COUNTRY_CODE
              - REPORT_DATE
              - ACTION_TYPE
    columns:
      - name: SOURCE_SCHEMA
        description: Source Fivetran schema.
        tests:
          - not_null
      - name: ID
        description: Ad ID
        tests:
          - not_null
      - name: COUNTRY_CODE
        description: Ad Country (ISO2 or UNKNOWN)
        tests:
          - not_null
      - name: REPORT_DATE
        description: Date of the performance report
        tests:
          - not_null
      - name: NAME
        description: Ad Name
        tests:
          - not_null
      - name: STATUS
        description: Ad Status
        tests:
          - not_null
      - name: EFFECTIVE_STATUS
        description: Ad Effective Status
        tests:
          - not_null
      - name: AD_SET_DAILY_BUDGET
        description: Ad Set Daily Budget
        tests:
          - not_null:
              arguments:
                where: "AD_SET_DAILY_BUDGET > 0"
      - name: AD_SET_LIFETIME_BUDGET
        description: Ad Set Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "AD_SET_LIFETIME_BUDGET > 0"
      - name: CAMPAIGN_DAILY_BUDGET
        description: Campaign Daily Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_DAILY_BUDGET > 0"
      - name: CAMPAIGN_LIFETIME_BUDGET
        description: Campaign Lifetime Budget
        tests:
          - not_null:
              arguments:
                where: "CAMPAIGN_LIFETIME_BUDGET > 0"
      - name: CREATIVE_ID
        description: Creative ID
        tests:
          - not_null
      - name: CREATIVE_ORIGINAL_THUMBNAIL_URL
        description: Creative thumbnail URL from the platform CDN. Expires in a few days after being synced from Fivetran.
      - name: CREATIVE_IMAGE_URL
        description: Ad Creative original Ad Image URL. It is present when a Creative is an Image uploaded directly to Ads Manager.
      - name: CREATIVE_VIDEO_URL
        description: Ad Creative original Ad Video URL. It is present when a Creative is a Video uploaded directly to Ads Manager.
      - name: CREATIVE_POST_URL
        description: Instagram post URL. It is present when a Creative is a boosted Instagram post.
      - name: ACCOUNT_ID
        description: Account ID
        tests:
          - not_null
      - name: CAMPAIGN_ID
        description: Campaign ID
        tests:
          - not_null
      - name: CAMPAIGN_NAME
        description: Campaign name
      - name: CAMPAIGN_GLOBAL_PARTICIPANT_ID
        description: Campaign Global Participant ID
      - name: OBJECTIVE
        description: Ad Objective
        tests:
          - not_null
      - name: CAMPAIGN_OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: REPORTING_URL
        description: An external URL to Facebook Ads Reporting screen where a given Ad is prefiltered.
        tests:
          - not_null
      - name: AD_SET_ID
        description: Ad Set ID
        tests:
          - not_null
      - name: AD_SET_NAME
        description: Ad Set name
        tests:
          - not_null
      - name: AD_SET_START_AT
        description: Ad Set Start At timestamp
        tests:
          - not_null
      - name: AD_SET_END_AT
        description: Ad Set End At timestamp
        tests:
          - not_null
      - name: TARGETING_COUNTRIES
        description: Targeting Countries ISO-2 country codes
        tests:
          - not_null
      - name: CURRENCY
        description: Currency code
        tests:
          - not_null
      - name: CLICKS
        description: Ad Total Clicks for the date and country
        tests:
          - not_null
      - name: IMPRESSIONS
        description: Ad Impressions for the date and country
        tests:
          - not_null
      - name: REACH
        description: Ad Reach for the date and country
        tests:
          - not_null
      - name: ESTIMATED_AD_RECALLERS
        description: |
          An estimate of the number of additional people who may remember seeing the ad, if asked, within 2 days
        tests:
          - not_null
      - name: VIEWS_P25
        description: The number of times a video was played at 25% of its length.
        tests:
          - not_null
      - name: VIEWS_THRUPLAY
        description: The number of times a video was played to completion or at least 15 seconds
        tests:
          - not_null
      - name: PURCHASES
        description: The number of purchases of an advertised item.
        tests:
          - not_null
      - name: FREQUENCY
        description: Impressions / Reach
        tests:
          - not_null
      - name: SPEND
        description: |
          Ad Spend for the date and country (in the original monetary units specified by CURRENCY column, e.g. USD or EUR).
        tests:
          - not_null
      - name: SPEND_USD
        description: |
          Ad Spend for the date and country (in USD, converted using The Orchard exchange rate from FACTS.PROD.DIM_CURRENCY).
        tests:
          - not_null
      - name: COST_PER_ACTION
        description: Cost Per Action
        tests:
          - not_null
      - name: COST_PER_ACTION_USD
        description: Cost Per Action in USD
        tests:
          - not_null
      - name: COST_PER_IMPRESSION
        description: Cost Per Impression
        tests:
          - not_null
      - name: COST_PER_IMPRESSION_USD
        description: Cost Per Impression in USD
        tests:
          - not_null
      - name: ACTION_TYPE
        description: Action Type Name
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: [ 'CLICKS', 'VIEWS', 'PURCHASES', 'EAR' ]
      - name: ACTIONS
        description: Actions value
        tests:
          - not_null
      - name: RATE_TYPE
        description: Rate Type
        tests:
          - not_null
          - accepted_values:
              arguments:
                values: ['CTR', 'VTR', 'CR', 'EARR']
      - name: RATE
        description: Rate Value
      - name: CTR
        description: Click Through Rate
      - name: SYNCED_AT
        description: A timestamp of the last ad performance data synced from Fivetran
        tests:
          - not_null
  - name: FACEBOOK_ADS__CAMPAIGN_BENCHMARK_BY_ACCOUNT_DBT
    description: Benchmark values of Meta Campaign performance by Account and Objective
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - VENDOR_ID
              - SUBACCOUNT_ID
              - PLATFORM
              - OBJECTIVE
    columns:
      - name: VENDOR_ID
        description: Vendor ID
        tests:
          - not_null
      - name: SUBACCOUNT_ID
        description: Subaccount ID
        tests:
          - not_null
      - name: PLATFORM
        description: Platform
        tests:
          - not_null
      - name: OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: AVG_RATE
        description: Average rate for all Campaigns given an objective (weighted by Actions)
        tests:
          - not_null
  - name: FACEBOOK_ADS__CAMPAIGN_BENCHMARK_BY_ACCOUNT_COUNTRY_DBT
    description: Benchmark values of Meta Campaign performance by Account, Objective and Country
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - VENDOR_ID
              - SUBACCOUNT_ID
              - COUNTRY_CODE
              - PLATFORM
              - OBJECTIVE
    columns:
      - name: VENDOR_ID
        description: Vendor ID
        tests:
          - not_null
      - name: SUBACCOUNT_ID
        description: Subaccount ID
        tests:
          - not_null
      - name: COUNTRY_CODE
        description: Ad Country (ISO2)
        tests:
          - not_null
          - dbt_expectations.expect_column_values_to_not_be_in_set:
              arguments:
                value_set:
                  - 'UNKNOWN'
      - name: PLATFORM
        description: Platform
        tests:
          - not_null
      - name: OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: AVG_RATE
        description: Average rate for all Campaigns given an objective (weighted by Actions)
        tests:
          - not_null
  - name: FACEBOOK_ADS__CAMPAIGN_BENCHMARK_BY_ACCOUNT_ARTIST_DBT
    description: Benchmark values of Meta Campaign performance by Account, Global Participant and Objective
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - VENDOR_ID
              - SUBACCOUNT_ID
              - GLOBAL_PARTICIPANT_ID
              - PLATFORM
              - OBJECTIVE
    columns:
      - name: VENDOR_ID
        description: Vendor ID
        tests:
          - not_null
      - name: SUBACCOUNT_ID
        description: Subaccount ID
        tests:
          - not_null
      - name: GLOBAL_PARTICIPANT_ID
        description: Global Participant ID
        tests:
          - not_null
      - name: PLATFORM
        description: Platform
        tests:
          - not_null
      - name: OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: AVG_RATE
        description: Average rate for all Campaigns given an objective (weighted by Actions)
        tests:
          - not_null
  - name: FACEBOOK_ADS__CAMPAIGN_BENCHMARK_BY_ACCOUNT_ARTIST_COUNTRY_DBT
    description: Benchmark values of Meta Campaign performance by Account, Global Participant, Objective and Country
    tests:
      - dbt_utils.unique_combination_of_columns:
          arguments:
            combination_of_columns:
              - VENDOR_ID
              - SUBACCOUNT_ID
              - GLOBAL_PARTICIPANT_ID
              - COUNTRY_CODE
              - PLATFORM
              - OBJECTIVE
    columns:
      - name: VENDOR_ID
        description: Vendor ID
        tests:
          - not_null
      - name: SUBACCOUNT_ID
        description: Subaccount ID
        tests:
          - not_null
      - name: GLOBAL_PARTICIPANT_ID
        description: Global Participant ID
        tests:
          - not_null
      - name: COUNTRY_CODE
        description: Ad Country (ISO2)
        tests:
          - not_null
          - dbt_expectations.expect_column_values_to_not_be_in_set:
              arguments:
                value_set: 'UNKNOWN'
      - name: PLATFORM
        description: Platform
        tests:
          - not_null
      - name: OBJECTIVE
        description: Campaign Objective
        tests:
          - not_null
      - name: AVG_RATE
        description: Average rate for all Campaigns given an objective (weighted by Actions)
        tests:
          - not_null
